Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCode_names = map[ErrCode]string{ E_FILTER_FIELD_UNSUPP: "filter: field not supported for filtering", E_FILTER_OPERATOR_UNSUPP: "filter: operator not supported for filtering", E_FILTER_OPERATOR_FIELD: "filter: operator not supported on field", E_ORDERBY_FIELD: "order_by: ordering not supported on field", E_ORDERBY_ORDER_FIELD: "order_by: [asc|desc] not supported on field", E_ORDERBY_ORDER: "order_by: [asc|desc] generally unsupported", }
View Source
var ErrDuplicateKey = fmt.Errorf("Duplicate Key error")
View Source
var ErrUnsupportedResult = fmt.Errorf("not supported result")
Functions ¶
This section is empty.
Types ¶
type ColumnFilter ¶
func (ColumnFilter) String ¶
func (c ColumnFilter) String() string
type ColumnOrder ¶
func (*ColumnOrder) Operator ¶
func (c *ColumnOrder) Operator() string
func (ColumnOrder) String ¶
func (c ColumnOrder) String() string
type InsertableTable ¶
type InsertableTable interface { Table TablePrepareInsert(ti *TableInsert) (TableInsertStmt, error) }
type ModifyResult ¶
type ModifyResult [2]*int64
func (*ModifyResult) LastInsertId ¶
func (r *ModifyResult) LastInsertId() (int64, error)
func (*ModifyResult) RowsAffected ¶
func (r *ModifyResult) RowsAffected() (int64, error)
type Table ¶
type Table interface { Columns() []string // 'cols' must be specified, an the same array must be used in // any .Next() call onto the returned TableIterator object. // Otherwise the behavoir is undefined. // // If the *TableScan object is not acceptible, return an error, // preferribly a ScanError{} TableScan(cols []int, meta *TableScan) (TableIterator, error) }
This interface represents a Scannable Table.
var tab table.Table cols := []int{0,1,2,3} vals := make([]interface{},4) iter,_ := tab.TableScan(cols,new(table.TableScan)) defer iter.Close() for { err := iter.Next(cols,vals) if err != nil { break } }
type TableInsert ¶
type TableInsertStmt ¶
type TableInsertStmt interface { Close() error Abort() error TableInsert(ti *TableInsert) (*ModifyResult, error) }
type TableIterator ¶
type TableScan ¶
type TableScan struct { Filter []ColumnFilter Order []ColumnOrder }
type TableUpdate ¶
type TableUpdateStmt ¶
type TableUpdateStmt interface { Close() error Abort() error TableUpdate(tu *TableUpdate) (*ModifyResult, error) }
type UpdateableTable ¶
type UpdateableTable interface { Table TablePrepareUpdate(tu *TableUpdate) (TableUpdateStmt, error) }
Click to show internal directories.
Click to hide internal directories.