Top Fields Constructors Methods
org.postgresql.core

public Class Field

extends Object
Class Inheritance
Imports
org.postgresql.jdbc.FieldMetadata, org.checkerframework.checker.nullness.qual.Nullable, org.checkerframework.dataflow.qual.Pure, java.util.Locale

Field Summary

Modifier and TypeField and Description
public static final int
private String
private int
private final int
private @Nullable FieldMetadata
private final int
private static final String
private final int
private String
private final int
private int
private final int
public static final int

Constructor Summary

AccessConstructor and Description
public
Field(String
the name (column name and label) of the field
name
,
int
the OID of the field
oid
,
int
the length of the field
length
,
int
modifier
mod
)

Construct a field based on the information fed to it.

public
Field(String
the name (column name and label) of the field
name
,
int
the OID of the field
oid
)

Constructor without mod parameter.

public
Field(String
the column label of the field
columnLabel
,
int
the OID of the field
oid
,
int
the length of the field
length
,
int
modifier
mod
,
int
the OID of the columns' table
tableOid
,
int
the position of column in the table (first column is 1, second column is 2, etc...)
positionInTable
)

Construct a field based on the information fed to it.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the column label of this Field's data type
getColumnLabel
()

public int

Returns:

the format of this Field's data (text=0, binary=1)
getFormat
()

public int

Returns:

the length of this Field's data type
getLength
()

public @Nullable FieldMetadata
public int

Returns:

the mod of this Field's data type
getMod
()

public int

Returns:

the oid of this Field's data type
getOID
()

public String
public int
public int
public int

Returns:

the columns' table oid, zero if no oid available
getTableOid
()

public boolean
public void
setFormat(int
the format of this Field's data (text=0, binary=1)
format
)

public void
public void
setPGType(String pgType)

public void
setSQLType(int sqlType)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

BINARY_FORMATback to summary
public static final int BINARY_FORMAT
columnLabelback to summary
private String columnLabel
formatback to summary
private int format
lengthback to summary
private final int length
metadataback to summary
private @Nullable FieldMetadata metadata
modback to summary
private final int mod
NOT_YET_LOADEDback to summary
private static final String NOT_YET_LOADED
oidback to summary
private final int oid
pgTypeback to summary
private String pgType
positionInTableback to summary
private final int positionInTable
sqlTypeback to summary
private int sqlType
tableOidback to summary
private final int tableOid
TEXT_FORMATback to summary
public static final int TEXT_FORMAT

Constructor Detail

Fieldback to summary
public Field(String name, int oid, int length, int mod)

Construct a field based on the information fed to it.

Parameters
name:String

the name (column name and label) of the field

oid:int

the OID of the field

length:int

the length of the field

mod:int

modifier

Fieldback to summary
public Field(String name, int oid)

Constructor without mod parameter.

Parameters
name:String

the name (column name and label) of the field

oid:int

the OID of the field

Fieldback to summary
public Field(String columnLabel, int oid, int length, int mod, int tableOid, int positionInTable)

Construct a field based on the information fed to it.

Parameters
columnLabel:String

the column label of the field

oid:int

the OID of the field

length:int

the length of the field

mod:int

modifier

tableOid:int

the OID of the columns' table

positionInTable:int

the position of column in the table (first column is 1, second column is 2, etc...)

Method Detail

getColumnLabelback to summary
public String getColumnLabel()
Returns:String

the column label of this Field's data type

getFormatback to summary
public int getFormat()
Returns:int

the format of this Field's data (text=0, binary=1)

getLengthback to summary
public int getLength()
Returns:int

the length of this Field's data type

getMetadataback to summary
public @Nullable FieldMetadata getMetadata()
getModback to summary
public int getMod()
Returns:int

the mod of this Field's data type

getOIDback to summary
public int getOID()
Returns:int

the oid of this Field's data type

Annotations
@Pure
getPGTypeback to summary
public String getPGType()
getPositionInTableback to summary
public int getPositionInTable()
getSQLTypeback to summary
public int getSQLType()
getTableOidback to summary
public int getTableOid()
Returns:int

the columns' table oid, zero if no oid available

isTypeInitializedback to summary
public boolean isTypeInitialized()
setFormatback to summary
public void setFormat(int format)
Parameters
format:int

the format of this Field's data (text=0, binary=1)

setMetadataback to summary
public void setMetadata(FieldMetadata metadata)
setPGTypeback to summary
public void setPGType(String pgType)
setSQLTypeback to summary
public void setSQLType(int sqlType)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
upperCaseLabelback to summary
public void upperCaseLabel()