Documentation
¶
Index ¶
- Constants
- func AddDocIDToResults(selectStmt *query.Select, results []map[string]interface{})
- func FindDocIDInWhere(qualify *expr.Qualify, args []interface{}) (string, bool, error)
- func FindDocIDValueInInsert(insertStmt *insert.Statement, args []interface{}) (string, bool, error)
- func HasDocIDInColumns(columns []string) bool
- func IsDocIDColumn(columnName string) bool
- type Config
- type Driver
- type Result
- type Rows
- type Statement
- func (s *Statement) Close() error
- func (s *Statement) Exec(args []driver.Value) (driver.Result, error)
- func (s *Statement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
- func (s *Statement) NumInput() int
- func (s *Statement) Query(args []driver.Value) (driver.Rows, error)
- func (s *Statement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
- type SubCollection
Constants ¶
const DocIDColumn = "id"
Variables ¶
This section is empty.
Functions ¶
func AddDocIDToResults ¶ added in v0.1.1
AddDocIDToResults adds document ID to query results
func FindDocIDInWhere ¶ added in v0.1.1
FindDocIDInWhere extracts document ID from WHERE docid = 'value' clause
func FindDocIDValueInInsert ¶ added in v0.1.1
FindDocIDValueInInsert finds the document ID value in the INSERT statement values
func HasDocIDInColumns ¶ added in v0.1.1
HasDocIDInColumns checks if the document ID column is present in the column list
func IsDocIDColumn ¶ added in v0.1.1
IsDocIDColumn checks if a column name is the document ID column
Types ¶
type Config ¶
type Config struct { CredentialsFile string // Username Endpoint string APIKey string CredentialJSON []byte CredentialsURL string CredID string //scy secret resource ID CredentialsKey string UserAgent string ProjectID string // project ID QuotaProject string Scopes []string Location string App string url.Values }
Config is a configuration parsed from a DSN string. If a new Config is created instead of being parsed from a DSN string, the NewConfig function should be used, which sets default values.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) LastInsertId ¶
func (*Result) RowsAffected ¶
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
Rows represents a result set for a SQL query
func (*Rows) ColumnTypeDatabaseTypeName ¶
ColumnTypeDatabaseTypeName returns the database type name of the column
func (*Rows) ColumnTypeNullable ¶ added in v0.1.1
ColumnTypeNullable reports whether the column may be null ColumnTypeNullable reports whether the column may be null
func (*Rows) ColumnTypeScanType ¶
ColumnTypeScanType returns the ScanType of the column at the given index
type Statement ¶
type Statement struct { SQL string // contains filtered or unexported fields }
func (*Statement) ExecContext ¶
func (s *Statement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
ExecContext executes a non-query statement with context
func (*Statement) QueryContext ¶
func (s *Statement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
QueryContext executes a query statement with context
type SubCollection ¶ added in v0.1.1
type SubCollection struct {
// contains filtered or unexported fields
}
SubCollection represents a subcollection reference