Package org.postgresql.core
Class Field
java.lang.Object
org.postgresql.core.Field
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private String
private int
private final int
private FieldMetadata
private final int
private static final String
private final int
private String
private final int
private int
private final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor without mod parameter.Construct a field based on the information fed to it.Construct a field based on the information fed to it. -
Method Summary
Modifier and TypeMethodDescriptionReturns the column label of this Field's data type.int
Returns the format of this Field's data (text=0, binary=1).int
Returns the length of this Field's data type.int
getMod()
Returns the mod of this Field's data typeint
getOID()
Returns the oid of this Field's data type.int
int
int
Returns the columns' table oid, zero if no oid available.boolean
void
setFormat
(int format) Sets the format of this Field's data (text=0, binary=1).void
setMetadata
(FieldMetadata metadata) void
void
setSQLType
(int sqlType) toString()
void
-
Field Details
-
TEXT_FORMAT
public static final int TEXT_FORMAT- See Also:
-
BINARY_FORMAT
public static final int BINARY_FORMAT- See Also:
-
length
private final int length -
oid
private final int oid -
mod
private final int mod -
columnLabel
-
format
private int format -
tableOid
private final int tableOid -
positionInTable
private final int positionInTable -
metadata
-
sqlType
private int sqlType -
pgType
-
NOT_YET_LOADED
-
-
Constructor Details
-
Field
Construct a field based on the information fed to it.- Parameters:
name
- the name (column name and label) of the fieldoid
- the OID of the fieldlength
- the length of the fieldmod
- modifier
-
Field
Constructor without mod parameter.- Parameters:
name
- the name (column name and label) of the fieldoid
- the OID of the field
-
Field
Construct a field based on the information fed to it.- Parameters:
columnLabel
- the column label of the fieldoid
- the OID of the fieldlength
- the length of the fieldmod
- modifiertableOid
- the OID of the columns' tablepositionInTable
- the position of column in the table (first column is 1, second column is 2, etc...)
-
-
Method Details
-
getOID
public int getOID()Returns the oid of this Field's data type.- Returns:
- the oid of this Field's data type
-
getMod
public int getMod()Returns the mod of this Field's data type- Returns:
- the mod of this Field's data type
-
getColumnLabel
Returns the column label of this Field's data type.- Returns:
- the column label of this Field's data type
-
getLength
public int getLength()Returns the length of this Field's data type.- Returns:
- the length of this Field's data type
-
getFormat
public int getFormat()Returns the format of this Field's data (text=0, binary=1).- Returns:
- the format of this Field's data (text=0, binary=1)
-
setFormat
public void setFormat(int format) Sets the format of this Field's data (text=0, binary=1).- Parameters:
format
- the format of this Field's data (text=0, binary=1)
-
getTableOid
public int getTableOid()Returns the columns' table oid, zero if no oid available.- Returns:
- the columns' table oid, zero if no oid available
-
getPositionInTable
public int getPositionInTable() -
getMetadata
-
setMetadata
-
toString
-
setSQLType
public void setSQLType(int sqlType) -
getSQLType
public int getSQLType() -
setPGType
-
getPGType
-
isTypeInitialized
public boolean isTypeInitialized() -
upperCaseLabel
public void upperCaseLabel()
-