Home | History | Annotate | Download | only in sql

Lines Matching refs:column

163 	Column      string
318 func (db *fakeDB) columnType(table, column string) (typ string, ok bool) {
326 if cname == column {
503 return nil, errf("SELECT on table %q has invalid column spec of %q (index %d)", stmt.table, colspec, n)
505 column, value := nameVal[0], nameVal[1]
506 _, ok := c.db.columnType(stmt.table, column)
509 return nil, errf("SELECT on table %q references non-existent column %q", stmt.table, column)
513 return nil, errf("SELECT on table %q has pre-bound value for where column %q; need a question mark",
514 stmt.table, column)
517 stmt.whereCol = append(stmt.whereCol, boundCol{Column: column, Placeholder: value, Ordinal: stmt.placeholders})
533 return nil, errf("CREATE table %q has invalid column spec of %q (index %d)", stmt.table, colspec, n)
552 return nil, errf("INSERT table %q has invalid column spec of %q (index %d)", stmt.table, colspec, n)
554 column, value := nameVal[0], nameVal[1]
555 ctype, ok := c.db.columnType(stmt.table, column)
558 return nil, errf("INSERT table %q references non-existent column %q", stmt.table, column)
560 stmt.colName = append(stmt.colName, column)
798 return nil, fmt.Errorf("fakedb: column %q doesn't exist or dropped since prepared statement was created", colname)
874 if len(s.whereCol) == 2 && s.whereCol[0].Column == "op" && s.whereCol[1].Column == "millis" {
883 colIdx := make(map[string]int) // select column name -> column index in table
888 return nil, fmt.Errorf("fakedb: unknown column name %q", name)
900 idx := t.columnIndex(wcol.Column)
903 return nil, fmt.Errorf("db: invalid where clause column %q", wcol)
934 for _, column := range s.colName {
935 colType = append(colType, t.coltype[t.columnIndex(column)])
1152 panic("invalid fakedb column type of " + typ)
1180 panic("invalid fakedb column type of " + typ)