MCPcopy Create free account
hub / github.com/araddon/qlbridge / Table

Struct Table

schema/schema.go:102–114  ·  view source on GitHub ↗

Table represents traditional definition of Database Table. It belongs to a Schema and can be used to create a Datasource used to read this table.

Source from the content-addressed store, hash-verified

100 // Table represents traditional definition of Database Table. It belongs to a Schema
101 // and can be used to create a Datasource used to read this table.
102 Table struct {
103 TablePb
104 Fields []*Field // List of Fields, in order
105 Context map[string]interface{} // During schema discovery of underlying source, may need to store additional info
106 FieldPositions map[string]int // Maps name of column to ordinal position in array of []driver.Value's
107 FieldMap map[string]*Field // Map of Field-name -> Field
108 Schema *Schema // The schema this is member of
109 Source Source // The source
110 tblID uint64 // internal tableid, hash of table name + schema?
111 cols []string // array of column names
112 lastRefreshed time.Time // Last time we refreshed this schema
113 rows [][]driver.Value
114 }
115
116 // Field Describes the column info, name, data type, defaults, index, null
117 // - dialects (mysql, mongo, cassandra) have their own descriptors for these,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected