MCPcopy Index your code
hub / github.com/dosco/graphjin / managedDBTable

Function managedDBTable

core/managed_query.go:54–72  ·  view source on GitHub ↗
(schema string, table ManagedTable)

Source from the content-addressed store, hash-verified

52}
53
54func managedDBTable(schema string, table ManagedTable) sdata.DBTable {
55 cols := make([]sdata.DBColumn, 0, len(table.Columns))
56 for i, col := range table.Columns {
57 typ := strings.TrimSpace(col.Type)
58 if typ == "" {
59 typ = "text"
60 }
61 cols = append(cols, sdata.DBColumn{
62 ID: int32(i),
63 Schema: schema,
64 Table: table.Name,
65 Name: col.Name,
66 Type: typ,
67 PrimaryKey: col.PrimaryKey,
68 FullText: col.FullText,
69 })
70 }
71 return sdata.NewDBTable(schema, table.Name, "managed", cols)
72}
73
74func (s *gstate) executeManagedQuery(c context.Context) (bool, error) {
75 if s.r.operation != qcode.QTQuery || s.cs == nil || s.cs.st.qc == nil {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected