MCPcopy Create free account
hub / github.com/apecloud/myduckserver / GetTableNames

Method GetTableNames

catalog/database.go:41–55  ·  view source on GitHub ↗

GetTableNames implements sql.Database.

(ctx *sql.Context)

Source from the content-addressed store, hash-verified

39var _ sql.TemporaryTableCreator = (*Database)(nil)
40var _ sql.StoredProcedureDatabase = (*Database)(nil)
41
42func vectorGeneratedExpression(col *sql.Column, typ types.VectorType) (string, error) {
43 fn, ok := col.Generated.Expr.(*vectorfn.StringToVector)
44 if !ok {
45 return "", fmt.Errorf("unsupported generated VECTOR expression: %s", col.Generated.Expr.String())
46 }
47 field, ok := fn.Child.(*expression.GetField)
48 if !ok {
49 return "", fmt.Errorf("unsupported STRING_TO_VECTOR generated argument: %s", fn.Child.String())
50 }
51 return fmt.Sprintf("STRING_TO_VECTOR(%s, %d)", QuoteIdentifierANSI(field.Name()), typ.Dimensions), nil
52}
53
54func NewDatabase(name string, catalogName string) *Database {
55 return &Database{
56 mu: &sync.RWMutex{},
57 name: name,
58 catalog: catalogName,

Callers 2

findTableFunction · 0.80
sanityCheckDatabaseFunction · 0.80

Calls 2

tablesInsensitiveMethod · 0.95
NameMethod · 0.45

Tested by 1

findTableFunction · 0.64