Documentation ¶
Overview ¶
Package core encapsulates an implementation for a given schema attached to a generator. This code represents an example implementation for oracle
Index ¶
- func Begin(name string) string
- func BindingDelete(g *sg.SQLGenerator, sch *schema.Schema, queryVals *object.Object) (string, []interface{}, error)
- func BindingInsert(g *sg.SQLGenerator, sch *schema.Schema, table string, ...) (string, []interface{}, error)
- func BindingInsertSQL(schTable *schema.Table, tableName string, colNames []string, ...) string
- func BindingRetrieve(g *sg.SQLGenerator, sch *schema.Schema, obj *object.Object) (string, []string, []interface{}, error)
- func BindingUpdate(g *sg.SQLGenerator, sch *schema.Schema, obj *object.Object) (string, []interface{}, []interface{}, error)
- func Commit() string
- func CoreBindingInsert(g *sg.SQLGenerator, schTable *schema.Table, data map[string]interface{}, ...) ([]string, []string, []interface{})
- func CreateTable(g *sg.SQLGenerator, s *schema.Schema, table string) (string, error)
- func DropTable(name string) string
- func DynamicObjectSetter(s *sg.SQLGenerator, schTable *schema.Table, columnNames []string, ...) error
- func GetLock(g *sg.SQLGenerator, sch *schema.Schema, lockStr string) (string, []interface{}, error)
- func MakeColumnPointers(s *sg.SQLGenerator, schTable *schema.Table, columnNames []string, ...) ([]interface{}, error)
- func New() *sg.SQLGenerator
- func ReleaseLock(g *sg.SQLGenerator, sch *schema.Schema, lockStr string) (string, []interface{}, error)
- func RenderBindingValueWithInt(f *schema.Column, i int) string
- func RenderInsertValue(bindI *int, f *schema.Column, value interface{}) (interface{}, error)
- func RenderUpdateWhereClause(g *sg.SQLGenerator, schTable *schema.Table, ...) (string, []interface{}, *int, error)
- func RenderWhereClause(g *sg.SQLGenerator, schTable *schema.Table, obj *object.Object) (string, []interface{}, error)
- type NullTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindingDelete ¶
func BindingDelete(g *sg.SQLGenerator, sch *schema.Schema, queryVals *object.Object) (string, []interface{}, error)
BindingDelete generates the appropriate SQL, binding args, and binding where clause parameters to execute the requested delete operation. 'obj' is not required to be a
func BindingInsert ¶
func BindingInsert(g *sg.SQLGenerator, sch *schema.Schema, table string, data map[string]interface{}) (string, []interface{}, error)
BindingInsert generates the SQL for a given INSERT statement for oracle with binding parameter values
func BindingInsertSQL ¶
func BindingRetrieve ¶
func BindingRetrieve(g *sg.SQLGenerator, sch *schema.Schema, obj *object.Object) (string, []string, []interface{}, error)
BindingRetrieve accepts a schema and an object, constructing the appropriate SELECT statement to retrieve the object. It will return sqlStr, the EssentialColumns used, and the binding where clause. DEBUG mode may be turned on by setting an environment parameter, "DEBUG".
func BindingUpdate ¶
func BindingUpdate(g *sg.SQLGenerator, sch *schema.Schema, obj *object.Object) (string, []interface{}, []interface{}, error)
BindingUpdate generates the SQL for a given UPDATE statement for oracle with binding parameter values
func CoreBindingInsert ¶
func CreateTable ¶
CreateTable determines the SQL to create a given table within a schema
func DynamicObjectSetter ¶
func DynamicObjectSetter(s *sg.SQLGenerator, schTable *schema.Table, columnNames []string, columnPointers []interface{}, columnTypes []*sql.ColumnType, obj *object.Object) error
DynamicObjectSetter is used to dynamically set the values of an object by checking the necessary types (via sql.ColumnType, and what the driver tells us we have for column types)
func MakeColumnPointers ¶
func MakeColumnPointers(s *sg.SQLGenerator, schTable *schema.Table, columnNames []string, columnTypes []*sql.ColumnType) ([]interface{}, error)
func New ¶
func New() *sg.SQLGenerator