Documentation
¶
Index ¶
- Constants
- type AttributeDetails
- type AttributeSpec
- type CastSpec
- type Catalog
- func (c *Catalog) AddTypeAffinity(ord int, words []string, typeOID int64) error
- func (c *Catalog) AddTypeRewrite(ord int, pattern, template, cond string) error
- func (c *Catalog) BoolTypeOID() (int64, error)
- func (c *Catalog) CastAllowed(src, tgt int64, ctx string) (bool, error)
- func (c *Catalog) ClassCodegenColumns(classOID int64) ([]CodegenColumn, error)
- func (c *Catalog) ClassColumns(classOID int64) ([]ClassColumn, error)
- func (c *Catalog) ClassOID(namespaceOID int64, name string) (int64, error)
- func (c *Catalog) ClassOIDByName(name string) (int64, error)
- func (c *Catalog) Close() error
- func (c *Catalog) ConstTypeOID(kind string) (int64, error)
- func (c *Catalog) CreateAttribute(classOID int64, name string, typeOID int64, notNull bool, hasDefault bool, ...) error
- func (c *Catalog) CreateAttributeSpec(s AttributeSpec) error
- func (c *Catalog) CreateCast(cs CastSpec) error
- func (c *Catalog) CreateClass(namespaceOID int64, name string, kind string) (int64, error)
- func (c *Catalog) CreateConstraint(classOID int64, name string, kind string, columns string) error
- func (c *Catalog) CreateDialect(name string) (int64, error)
- func (c *Catalog) CreateNamespace(name string) (int64, error)
- func (c *Catalog) CreateOperator(o OperatorSpec) (int64, error)
- func (c *Catalog) CreateProc(p ProcSpec) (int64, error)
- func (c *Catalog) CreateType(name string) (int64, error)
- func (c *Catalog) CreateTypeSpec(t TypeSpec) (int64, error)
- func (c *Catalog) CreateTypeWithArgs(spec TypeSpec, args []TypeArg) (int64, error)
- func (c *Catalog) CreateUserType(name, category string) (int64, error)
- func (c *Catalog) DB() *sql.DB
- func (c *Catalog) DefaultNamespaces() []string
- func (c *Catalog) DialectFlag(dialectOID int64, key string) (string, error)
- func (c *Catalog) DialectOID(name string) (int64, error)
- func (c *Catalog) DropAttribute(classOID int64, name string) error
- func (c *Catalog) DropClass(classOID int64) error
- func (c *Catalog) FindCast(src, tgt int64) (CastSpec, bool, error)
- func (c *Catalog) FindOperators(name string, leftTypeOID, rightTypeOID int64) ([]OperatorOverload, error)
- func (c *Catalog) FindProcs(name string, namespaceOIDs []int64) ([]ProcOverload, error)
- func (c *Catalog) IsComparisonOperator(name string) bool
- func (c *Catalog) LimitTypeOID() (int64, error)
- func (c *Catalog) LoadExtension(name string) error
- func (c *Catalog) LookupAttribute(attOID int64) (AttributeDetails, error)
- func (c *Catalog) LookupType(oid int64) (TypeInfo, error)
- func (c *Catalog) LookupTypeExpr(t *TypeExpr) (TypeLookup, bool)
- func (c *Catalog) NamespaceOID(name string) (int64, error)
- func (c *Catalog) Namespaces() ([]NamespaceInfo, error)
- func (c *Catalog) NextAttributeNum(classOID int64) (int, error)
- func (c *Catalog) PropagatesNullable() bool
- func (c *Catalog) QualifiesDuplicateColumns() bool
- func (c *Catalog) RenameAttribute(classOID int64, name, newName string) error
- func (c *Catalog) RenameClass(classOID int64, name string) error
- func (c *Catalog) ResolutionChain(oid int64) []int64
- func (c *Catalog) ResolutionOID(oid int64) int64
- func (c *Catalog) ResolveColumn(table, column string) (*ColumnInfo, error)
- func (c *Catalog) ResolvePseudoTypeExpr(t *TypeExpr) (int64, error)
- func (c *Catalog) ResolveType(tn *ast.TypeName) (int64, error)
- func (c *Catalog) ResolveTypeExpr(t *TypeExpr) (int64, error)
- func (c *Catalog) ResolveTypeName(name string) (int64, error)
- func (c *Catalog) SeededDialectOID() int64
- func (c *Catalog) SetAttributeNotNull(classOID int64, name string, notNull bool) error
- func (c *Catalog) SetAttributePrimaryKey(classOID int64, columns []string) error
- func (c *Catalog) SetAttributeType(classOID int64, name string, typeOID int64, declType string) error
- func (c *Catalog) SetAttributeUnique(classOID int64, columns []string) error
- func (c *Catalog) SetConstType(dialectOID int64, kind, typeName string) error
- func (c *Catalog) SetDialectFlag(dialectOID int64, key, value string) error
- func (c *Catalog) SetExtensionLoader(fn func(name string) error)
- func (c *Catalog) TableColumns(table string) ([]ColumnInfo, error)
- func (c *Catalog) TablesInNamespace(namespaceOID int64) ([]ClassInfo, error)
- func (c *Catalog) TypeDeclared(name string) bool
- func (c *Catalog) TypeExprOf(oid int64) (*TypeExpr, error)
- func (c *Catalog) TypeName(oid int64) (string, error)
- func (c *Catalog) TypeOID(name string) (int64, error)
- func (c *Catalog) TypeOIDsInCategory(category string) ([]int64, error)
- func (c *Catalog) UntypedTypeOID() (int64, bool)
- type ClassColumn
- type ClassInfo
- type CodegenColumn
- type Column
- type ColumnInfo
- type ColumnSource
- type Command
- type NamespaceInfo
- type OperatorOverload
- type OperatorSpec
- type Option
- type Parameter
- type PrepareResult
- type ProcArg
- type ProcOverload
- type ProcSpec
- type StarColumn
- type StarExpansion
- type TypeArg
- type TypeExpr
- func (t *TypeExpr) ArrayDims() int
- func (t *TypeExpr) Clone() *TypeExpr
- func (t *TypeExpr) Element() *TypeExpr
- func (t *TypeExpr) HasNullable() bool
- func (t *TypeExpr) Innermost() *TypeExpr
- func (t *TypeExpr) IsArray() bool
- func (t *TypeExpr) Key() string
- func (t *TypeExpr) String() string
- func (t *TypeExpr) WithNullable(nullable bool) *TypeExpr
- type TypeInfo
- type TypeLookup
- type TypeSpec
Constants ¶
const ( ConstInteger = "integer" ConstFloat = "float" ConstString = "string" ConstBool = "bool" )
Constant kinds. A literal in a query has no declared type, so each dialect names the type its literals take on.
const ArraySuffix = "[]"
ArraySuffix is the suffix a schema appends to an element type's spelling to name an array of it, which ParseTypeExpr reads as one array dimension.
const ArrayTypeName = "array"
ArrayTypeName is the family every dialect's array is an instance of: an array of integers is array(integer), whatever the dialect spells it.
const FlagBoolType = "types.bool"
FlagBoolType holds the type a comparison or predicate yields, when it is not the type a boolean literal has: ClickHouse compares to UInt8 while writing true as Bool.
const FlagCastCategories = "casts.categories"
FlagCastCategories holds the categories whose types are all implicitly castable to one another, as the dialect's seed declared them, so that a type arriving after the seed — an extension's, say — can join its category.
const FlagComparisonOperators = "operators.comparison"
FlagComparisonOperators holds the dialect's comparison operators as a comma-separated list, so that a type declared by a schema can be given the same ones the seeded types have.
const FlagDefaultSchema = "schema.default"
FlagDefaultSchema holds the schema the dialect puts an unqualified object in, when that is not the catalog's own default: a type in it is reported without its schema.
const FlagIdentArgs = "types.ident_args"
FlagIdentArgs holds the argument positions that are identifiers in a family, as "family:1,2;family:1".
const FlagIdents = "types.idents"
FlagIdents holds the words that are identifiers wherever they stand as a type argument, comma-separated.
const FlagLimitType = "types.limit"
FlagLimitType holds the type a LIMIT or OFFSET count has, which is what a placeholder in one is typed as.
const FlagPropagateNullable = "functions.propagate_nullable"
FlagPropagateNullable is set when a function's result is nullable whenever one of its arguments is, the way ClickHouse's ordinary functions behave.
const FlagQualifyDuplicateColumns = "columns.qualify_duplicates"
FlagQualifyDuplicateColumns is set for a dialect that names a result column after its relation when an earlier result column from another relation has the same name, as ClickHouse names the second id of a join e.id.
const FlagUntypedType = "types.untyped"
FlagUntypedType holds the type a placeholder takes when nothing in the query constrains it, for a dialect that gives such a placeholder one.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeDetails ¶
type AttributeSpec ¶
type AttributeSpec struct {
ClassOID int64
Name string
TypeOID int64
Num int
NotNull bool
HasDefault bool
DeclType string
AutoIncrement bool
IsPrimaryKey bool
IsUnique bool
// Hidden columns resolve by name but stay out of a star expansion and
// the relation's model, like the column an sqlite fts5 table names
// after itself.
Hidden bool
}
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewCached ¶
func NewCached(dialect string, schema []string, apply func(*Catalog) error, opts ...Option) (*Catalog, error)
NewCached returns the catalog a dialect and a schema produce, restored from the cache when a run has produced it before.
Producing one means seeding the dialect — thousands of rows, since PostgreSQL's functions and system catalogs alone run to five figures — and then parsing the schema and applying its DDL. The result is the same every time, so the finished database is stored in the cache and opened directly on the next run, turning all of that work into opening a file. It is a single action: the dialect and the schema together are what the catalog is, so they are one key, and a hit means apply is never called.
The dialect data is embedded in the sqlc binary, whose digest is an input to every action, so the dialect only has to be named. The schema is hashed in the order it is applied, since DDL order decides what the catalog holds.
A catalog whose apply fails is returned but not cached, so that a caller can report the failure against the catalog it got. A nil catalog means the catalog could not be created at all. A cache that cannot be opened, read or written is not an error: the catalog is simply built the long way.
func (*Catalog) AddTypeAffinity ¶
AddTypeAffinity records the next step of the dialect's affinity rule: a family whose name contains one of words, upper-cased, stands on typeOID. No words is the default that ends the rule.
func (*Catalog) AddTypeRewrite ¶
AddTypeRewrite records a rewrite of the catalog's dialect, applied after the ones recorded before it.
func (*Catalog) BoolTypeOID ¶
BoolTypeOID returns the type a comparison or predicate yields.
func (*Catalog) CastAllowed ¶
func (*Catalog) ClassCodegenColumns ¶
func (c *Catalog) ClassCodegenColumns(classOID int64) ([]CodegenColumn, error)
func (*Catalog) ClassColumns ¶
func (c *Catalog) ClassColumns(classOID int64) ([]ClassColumn, error)
ClassColumns returns a relation's columns in ordinal order.
func (*Catalog) ConstTypeOID ¶
ConstTypeOID returns the type a literal of the given kind takes on.
func (*Catalog) CreateAttribute ¶
func (*Catalog) CreateAttributeSpec ¶
func (c *Catalog) CreateAttributeSpec(s AttributeSpec) error
func (*Catalog) CreateCast ¶
func (*Catalog) CreateClass ¶
func (*Catalog) CreateConstraint ¶
func (*Catalog) CreateOperator ¶
func (c *Catalog) CreateOperator(o OperatorSpec) (int64, error)
func (*Catalog) CreateTypeSpec ¶
CreateTypeSpec inserts a type row. It is the raw insert: nothing is canonicalized and no arguments are written, so it is what the seed and ResolveTypeExpr build on rather than what a caller with an expression wants.
func (*Catalog) CreateTypeWithArgs ¶
CreateTypeWithArgs registers a declared type that has arguments of its own — a composite's fields, an enum's labels — as a family row carrying them. The arguments' types are interned first.
func (*Catalog) CreateUserType ¶
CreateUserType registers a type family a schema declared rather than the dialect, such as an enum or a name the dialect's seed does not list. The type gains the dialect's comparison operators, so a column of it can be compared.
func (*Catalog) DefaultNamespaces ¶
DefaultNamespaces lists the namespaces a type is reported from without qualification: the catalog's default, PostgreSQL's system catalog, and the dialect's own default schema when it names one.
func (*Catalog) DialectFlag ¶
func (*Catalog) DropAttribute ¶
DropAttribute removes a column from a relation.
func (*Catalog) FindOperators ¶
func (c *Catalog) FindOperators(name string, leftTypeOID, rightTypeOID int64) ([]OperatorOverload, error)
FindOperators returns the overloads of name matching the given operand types, where a zero OID means "any".
func (*Catalog) FindProcs ¶
func (c *Catalog) FindProcs(name string, namespaceOIDs []int64) ([]ProcOverload, error)
FindProcs returns the overloads of name, optionally restricted to the given namespaces.
func (*Catalog) IsComparisonOperator ¶
IsComparisonOperator reports whether the dialect counts name among the operators that compare two values and yield a boolean.
func (*Catalog) LimitTypeOID ¶
LimitTypeOID returns the type a LIMIT or OFFSET count has, falling back to the type of an integer literal.
func (*Catalog) LoadExtension ¶
LoadExtension applies the named extension's seed to the catalog. An extension already applied, or a dialect with no loader, contributes nothing; an extension the loader does not know is the loader's to ignore.
func (*Catalog) LookupAttribute ¶
func (c *Catalog) LookupAttribute(attOID int64) (AttributeDetails, error)
func (*Catalog) LookupType ¶
LookupType returns what the catalog holds about a type row.
func (*Catalog) LookupTypeExpr ¶
func (c *Catalog) LookupTypeExpr(t *TypeExpr) (TypeLookup, bool)
LookupTypeExpr finds the row an expression names without writing, and reports false when the family is not one the catalog holds.
func (*Catalog) Namespaces ¶
func (c *Catalog) Namespaces() ([]NamespaceInfo, error)
func (*Catalog) NextAttributeNum ¶
NextAttributeNum is the ordinal a column added to the relation takes.
func (*Catalog) PropagatesNullable ¶
PropagatesNullable reports whether a function's result is nullable whenever one of its arguments is.
func (*Catalog) QualifiesDuplicateColumns ¶
QualifiesDuplicateColumns reports whether a result column that repeats an earlier one's name from another relation is named after its relation.
func (*Catalog) RenameAttribute ¶
RenameAttribute renames a column.
func (*Catalog) ResolutionChain ¶
ResolutionChain lists the type and every row resolution falls back to, in order, ending with the family everything about the type is registered on.
func (*Catalog) ResolutionOID ¶
ResolutionOID is the row an operator, function or cast over the type is looked up on when none is registered on the type itself: an instance's family, an alias's canonical type, a domain's or wrapper's base. It returns 0 when there is nothing further to fall back to.
func (*Catalog) ResolveColumn ¶
func (c *Catalog) ResolveColumn(table, column string) (*ColumnInfo, error)
func (*Catalog) ResolvePseudoTypeExpr ¶
ResolvePseudoTypeExpr is ResolveTypeExpr for the type a function signature names. Signatures reference pseudo-types ("any", "record") and types no dialect bothers to list, so an unknown family is registered as an opaque type rather than rejected, and gets no operators of its own.
func (*Catalog) ResolveType ¶
ResolveType interns the type an AST node names, registering it when the dialect's seed did not: a schema is free to declare types of its own.
func (*Catalog) ResolveTypeExpr ¶
ResolveTypeExpr interns the type an expression names and returns its row: the family for a bare name, the instance for a family applied to arguments, each argument type interned first. Names are canonicalized, so integer and int4 intern to one row. A family the dialect did not seed is one the schema declared, and is registered as a user type.
func (*Catalog) ResolveTypeName ¶
ResolveTypeName is ResolveTypeExpr for a type spelled as a string.
func (*Catalog) SeededDialectOID ¶
SeededDialectOID returns the dialect this catalog was seeded with, which is what anything registered after seeding — an extension's types and functions — records as its dialect.
func (*Catalog) SetAttributeNotNull ¶
SetAttributeNotNull records whether a column accepts NULL.
func (*Catalog) SetAttributePrimaryKey ¶
func (*Catalog) SetAttributeType ¶
func (c *Catalog) SetAttributeType(classOID int64, name string, typeOID int64, declType string) error
SetAttributeType changes a column's type.
func (*Catalog) SetAttributeUnique ¶
func (*Catalog) SetConstType ¶
SetConstType records the type a literal of the given kind takes on in this dialect.
func (*Catalog) SetDialectFlag ¶
func (*Catalog) SetExtensionLoader ¶
SetExtensionLoader installs the function CREATE EXTENSION calls to apply an extension's seed. A dialect without extension data leaves it unset.
func (*Catalog) TableColumns ¶
func (c *Catalog) TableColumns(table string) ([]ColumnInfo, error)
func (*Catalog) TablesInNamespace ¶
func (*Catalog) TypeDeclared ¶
TypeDeclared reports whether a schema's CREATE TYPE would redeclare a type: one of that name in the namespace the name qualifies, or in the default namespaces for a bare name.
func (*Catalog) TypeExprOf ¶
TypeExprOf is the expression a type row stands for, read back from its arguments: the family's name for a family, the family applied to its arguments for an instance. The result is the caller's to change.
func (*Catalog) TypeOID ¶
TypeOID returns the family a name refers to: an alias spelling resolves to the type it names.
func (*Catalog) TypeOIDsInCategory ¶
TypeOIDsInCategory returns the type families the catalog's dialect has in the named category, in the order they were created.
func (*Catalog) UntypedTypeOID ¶
UntypedTypeOID returns the type an unconstrained placeholder takes, and whether the dialect gives it one at all.
type ClassColumn ¶
type CodegenColumn ¶
type Column ¶
type Column struct {
Name string `json:"name"`
DataType string `json:"data_type"`
// Type is the column's type as an expression, carrying what DataType
// and IsArray flatten away: arguments, nesting and inner nullability.
Type *TypeExpr `json:"type,omitempty"`
TypeOID int64 `json:"type_oid,omitempty"`
NotNull bool `json:"not_null"`
IsArray bool `json:"is_array,omitempty"`
SourceClassOID int64 `json:"source_class_oid,omitempty"`
SourceAttributeOID int64 `json:"source_attribute_oid,omitempty"`
Source *ColumnSource `json:"source,omitempty"`
DeclType string `json:"decl_type,omitempty"`
IsPrimaryKey bool `json:"is_primary_key,omitempty"`
IsUnique bool `json:"is_unique,omitempty"`
IsAutoIncrement bool `json:"is_auto_increment,omitempty"`
}
type ColumnInfo ¶
type ColumnSource ¶
type NamespaceInfo ¶
type OperatorOverload ¶
type OperatorSpec ¶
type Parameter ¶
type Parameter struct {
Number int `json:"number"`
Name string `json:"name,omitempty"`
DataType string `json:"data_type,omitempty"`
Type *TypeExpr `json:"type,omitempty"`
TypeOID int64 `json:"type_oid,omitempty"`
NotNull bool `json:"not_null"`
IsArray bool `json:"is_array,omitempty"`
Source *ColumnSource `json:"source,omitempty"`
}
type PrepareResult ¶
type PrepareResult struct {
Command Command `json:"command,omitempty"`
Columns []Column `json:"columns"`
Parameters []Parameter `json:"parameters"`
Stars []StarExpansion `json:"stars,omitempty"`
}
type ProcOverload ¶
type ProcSpec ¶
type ProcSpec struct {
Name string
NamespaceOID int64
DialectOID int64
Kind string
ReturnTypeOID int64
ReturnSet bool
ReturnNullable bool
// NeverNull marks a function whose result is never NULL even when an
// argument is, in a dialect that otherwise propagates nullability.
NeverNull bool
// ReturnTemplate is the result as an expression over the call's
// arguments, when it depends on their values: Decimal(18, $2) for
// toDecimal64(x, s).
ReturnTemplate string
Strict bool
VariadicKind string
Args []ProcArg
}
type StarColumn ¶
type StarColumn struct {
// Relation is the name the column's relation goes by in the query, which
// is its alias when it was given one.
Relation string `json:"relation,omitempty"`
Name string `json:"name"`
DataType string `json:"data_type,omitempty"`
}
StarColumn is a single column a star expanded to.
type StarExpansion ¶
type StarExpansion struct {
// Location is where the target the star belongs to starts, measured the
// way the AST measures a node: from the beginning of the file the
// statement was parsed from.
Location int `json:"location"`
// Fields is the reference as it was written, with the star as its last
// element: ["*"] for a bare star and ["foo", "*"] for a qualified one.
Fields []string `json:"fields"`
// Alias is the output name the target was given, if any.
Alias string `json:"alias,omitempty"`
Columns []StarColumn `json:"columns"`
}
StarExpansion is what a star in a target list stands for. The analyzer resolves the reference against the query's scope and reports the columns it covers; rewriting the query text with them is the caller's to do, since only it knows how the engine quotes an identifier.
type TypeArg ¶
type TypeArg struct {
Label string `json:"label,omitempty"`
Type *TypeExpr `json:"type,omitempty"`
Int *int64 `json:"int,omitempty"`
Bool *bool `json:"bool,omitempty"`
String *string `json:"string,omitempty"`
Ident *string `json:"ident,omitempty"`
}
TypeArg is one argument of a TypeExpr: exactly one of Type, Int, Bool, String or Ident is set. Ident is a bare word that is not a type — the max of nvarchar(max), the function of SimpleAggregateFunction(sum, UInt64), the fields of interval day to second.
type TypeExpr ¶
type TypeExpr struct {
Name string `json:"name"`
Nullable bool `json:"nullable,omitempty"`
Args []TypeArg `json:"args,omitempty"`
}
TypeExpr is a type written as a call expression: a lowercased name applied to arguments that are other types, integers, booleans or strings, each with an optional label, and a nullable flag at whatever depth it applies. Nothing about a nested type is special-cased, so an array of nullable strings is array(string nullable), a map is map(string, uint32) and a named tuple is tuple(lat: float64, lon: float64). The catalog resolves the names; the expression only records what was declared or inferred.
func ColumnTypeExpr ¶
ColumnTypeExpr reads a column definition's type. Engines report an array column either on the type name or on the column itself.
func ParseTypeExpr ¶
ParseTypeExpr reads a type spelled the way every dialect spells one, as a name optionally applied to a parenthesised, comma-separated argument list whose entries may be labelled (`lat Float64` in a tuple, `'a' = 1` in an enum). A Nullable(T) wrapper becomes T with Nullable set, and a trailing [] becomes an array of the element.
func TypeExprOfTypeName ¶
TypeExprOfTypeName reads the type an AST node names into an expression. An engine that renders the whole type as a call expression — DuckDB's struct(a: integer, b: varchar) — hands it over in Canonical; one that folds it into the spelling the formatter prints back — ClickHouse's Array(Nullable(String)), SQLite's VARYING CHARACTER(10) — in Spelling. Otherwise the name comes from Name or the qualifying parts of Names, the type modifiers become integer or string arguments, and each array bound wraps the result in an array.
func (*TypeExpr) ArrayDims ¶
ArrayDims counts the array dimensions wrapped around the expression's innermost type, and Innermost is that type: the integer of an array of arrays of integers.
func (*TypeExpr) Clone ¶
Clone copies the expression, arguments and all, so that a caller can set nullability on the copy without touching a cached one.
func (*TypeExpr) HasNullable ¶
HasNullable reports whether the expression marks nullability anywhere, which tells whether the spelling it came from said so itself.
func (*TypeExpr) Key ¶
Key is the expression's canonical spelling, which identifies its row in the catalog: the expression's own nullability is not part of it, since a row is never nullable, while the nullability of a nested type is.
func (*TypeExpr) String ¶
String renders the expression in its canonical text form, with a trailing "nullable" marking a nullable type.
func (*TypeExpr) WithNullable ¶
WithNullable returns a copy of the expression with its own nullability set as given; the nullability of a nested type is left alone.
type TypeInfo ¶
type TypeInfo struct {
OID int64
NamespaceOID int64
Name string
Expr string
Category string
Typtype string
Preferred bool
FamilyOID int64
ElementOID int64
BaseOID int64
CanonicalOID int64
NotNull bool
}
TypeInfo is a type row as the catalog holds it.
type TypeLookup ¶
type TypeLookup struct {
// OID is the instance row when the catalog holds one, otherwise the
// family row.
OID int64
// FamilyOID is the family, which is OID for a family or an instance the
// catalog does not hold.
FamilyOID int64
// Expr is the expression canonicalized: the family and every argument
// type spelled as the catalog spells them, whether or not the instance
// is a row.
Expr *TypeExpr
}
TypeLookup is what LookupTypeExpr found for an expression.
type TypeSpec ¶
type TypeSpec struct {
Name string
Expr string
Typtype string
Category string
Preferred bool
NamespaceOID int64
DialectOID int64
FamilyOID int64
ElementOID int64
BaseOID int64
CanonicalOID int64
NotNull bool
}
TypeSpec describes a type row. Name is the family's name; Expr is the canonical spelling of the whole expression and defaults to the name, which is what a family's is.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package seed builds a core catalog for a SQL dialect from a declarative description of its type system: the types it defines, the operators and casts between them, and the functions it ships with.
|
Package seed builds a core catalog for a SQL dialect from a declarative description of its type system: the types it defines, the operators and casts between them, and the functions it ships with. |