public class Field extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BINARY_FORMAT |
static int |
TEXT_FORMAT |
Constructor and Description |
---|
Field(String name,
int oid)
Constructor without mod parameter.
|
Field(String name,
int oid,
int length,
int mod)
Construct a field based on the information fed to it.
|
Field(String columnLabel,
int oid,
int length,
int mod,
int tableOid,
int positionInTable)
Construct a field based on the information fed to it.
|
Modifier and Type | Method and Description |
---|---|
String |
getColumnLabel() |
int |
getFormat() |
int |
getLength() |
FieldMetadata |
getMetadata() |
int |
getMod() |
int |
getOID() |
String |
getPGType() |
int |
getPositionInTable() |
int |
getSQLType() |
int |
getTableOid() |
boolean |
isTypeInitialized() |
void |
setFormat(int format) |
void |
setMetadata(FieldMetadata metadata) |
void |
setPGType(String pgType) |
void |
setSQLType(int sqlType) |
String |
toString() |
public static final int TEXT_FORMAT
public static final int BINARY_FORMAT
public Field(String name, int oid, int length, int mod)
name
- the name (column name and label) of the fieldoid
- the OID of the fieldlength
- the length of the fieldmod
- modifierpublic Field(String name, int oid)
name
- the name (column name and label) of the fieldoid
- the OID of the fieldpublic Field(String columnLabel, int oid, int length, int mod, int tableOid, int positionInTable)
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...)public int getOID()
public int getMod()
public String getColumnLabel()
public int getLength()
public int getFormat()
public void setFormat(int format)
format
- the format of this Field's data (text=0, binary=1)public int getTableOid()
public int getPositionInTable()
public FieldMetadata getMetadata()
public void setMetadata(FieldMetadata metadata)
public void setSQLType(int sqlType)
public int getSQLType()
public void setPGType(String pgType)
public String getPGType()
public boolean isTypeInitialized()
Copyright © 2017 PostgreSQL Global Development Group. All rights reserved.