(schema string, table ManagedTable)
| 52 | } |
| 53 | |
| 54 | func 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 | |
| 74 | func (s *gstate) executeManagedQuery(c context.Context) (bool, error) { |
| 75 | if s.r.operation != qcode.QTQuery || s.cs == nil || s.cs.st.qc == nil { |
no outgoing calls
no test coverage detected