Documentation ¶
Index ¶
- Constants
- Variables
- func PatternToRegexp(pattern *string) (*regexp.Regexp, error)
- type CatalogAndSchema
- type CatalogSchemaTable
- type CatalogSchemaTableColumn
- type ConstraintSchema
- type GetObjDBSchemasFn
- type GetObjTablesFn
- type GetObjects
- type Metadata
- type SchemaToTableInfo
- type TableInfo
- type UsageSchema
- type XdbcDataType
Constants ¶
View Source
const ( Unique = "UNIQUE" PrimaryKey = "PRIMARY KEY" ForeignKey = "FOREIGN KEY" )
Variables ¶
View Source
var (
AcceptAll = regexp.MustCompile(".*")
)
Functions ¶
Types ¶
type CatalogAndSchema ¶
type CatalogAndSchema struct {
Catalog, Schema string
}
type CatalogSchemaTable ¶ added in v0.11.0
type CatalogSchemaTable struct {
Catalog, Schema, Table string
}
type CatalogSchemaTableColumn ¶ added in v0.11.0
type CatalogSchemaTableColumn struct {
Catalog, Schema, Table, Column string
}
type ConstraintSchema ¶ added in v0.11.0
type ConstraintSchema struct {
ConstraintName, ConstraintType string
ConstraintColumnNames []string
ConstraintColumnUsages []UsageSchema
}
type GetObjDBSchemasFn ¶
type GetObjTablesFn ¶
type GetObjects ¶
type GetObjects struct { Ctx context.Context Depth adbc.ObjectDepth Catalog *string DbSchema *string TableName *string ColumnName *string TableType []string ConstraintLookup map[CatalogSchemaTable][]ConstraintSchema MetadataRecords []Metadata // contains filtered or unexported fields }
Helper to store state needed for GetObjects
func (*GetObjects) AppendCatalog ¶
func (g *GetObjects) AppendCatalog(catalogName string)
func (*GetObjects) Finish ¶
func (g *GetObjects) Finish() (array.RecordReader, error)
func (*GetObjects) Init ¶
func (g *GetObjects) Init(mem memory.Allocator, getObj GetObjDBSchemasFn, getTbls GetObjTablesFn) error
func (*GetObjects) Release ¶
func (g *GetObjects) Release()
type Metadata ¶ added in v0.9.0
type Metadata struct { Created time.Time ColName, DataType, Dbname, Kind, Schema, TblName, TblType, IdentGen, IdentIncrement, Comment, ConstraintName, ConstraintType sql.NullString OrdinalPos int NumericPrec, NumericPrecRadix, NumericScale, DatetimePrec sql.NullInt16 IsNullable, IsIdent bool CharMaxLength, CharOctetLength sql.NullInt32 }
type SchemaToTableInfo ¶
type SchemaToTableInfo = map[CatalogAndSchema][]TableInfo
type UsageSchema ¶ added in v0.11.0
type UsageSchema struct {
ForeignKeyCatalog, ForeignKeyDbSchema, ForeignKeyTable, ForeignKeyColName string
}
type XdbcDataType ¶ added in v0.7.0
type XdbcDataType int32
The JDBC/ODBC-defined type of any object. All the values here are the sames as in the JDBC and ODBC specs.
const ( XdbcDataType_XDBC_UNKNOWN_TYPE XdbcDataType = 0 XdbcDataType_XDBC_CHAR XdbcDataType = 1 XdbcDataType_XDBC_NUMERIC XdbcDataType = 2 XdbcDataType_XDBC_DECIMAL XdbcDataType = 3 XdbcDataType_XDBC_INTEGER XdbcDataType = 4 XdbcDataType_XDBC_SMALLINT XdbcDataType = 5 XdbcDataType_XDBC_FLOAT XdbcDataType = 6 XdbcDataType_XDBC_REAL XdbcDataType = 7 XdbcDataType_XDBC_DOUBLE XdbcDataType = 8 XdbcDataType_XDBC_DATETIME XdbcDataType = 9 XdbcDataType_XDBC_INTERVAL XdbcDataType = 10 XdbcDataType_XDBC_VARCHAR XdbcDataType = 12 XdbcDataType_XDBC_DATE XdbcDataType = 91 XdbcDataType_XDBC_TIME XdbcDataType = 92 XdbcDataType_XDBC_TIMESTAMP XdbcDataType = 93 XdbcDataType_XDBC_LONGVARCHAR XdbcDataType = -1 XdbcDataType_XDBC_BINARY XdbcDataType = -2 XdbcDataType_XDBC_VARBINARY XdbcDataType = -3 XdbcDataType_XDBC_LONGVARBINARY XdbcDataType = -4 XdbcDataType_XDBC_BIGINT XdbcDataType = -5 XdbcDataType_XDBC_TINYINT XdbcDataType = -6 XdbcDataType_XDBC_BIT XdbcDataType = -7 XdbcDataType_XDBC_WCHAR XdbcDataType = -8 XdbcDataType_XDBC_WVARCHAR XdbcDataType = -9 )
Directories ¶
Path | Synopsis |
---|---|
Package driverbase provides a framework for implementing ADBC drivers in Go.
|
Package driverbase provides a framework for implementing ADBC drivers in Go. |
Click to show internal directories.
Click to hide internal directories.