oracle

package
v0.0.0-...-22ac7ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package oracle encapsulates an implementation for a given schema attached to a generator. This code represents an example implementation for oracle

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindingInsertSQL

func BindingInsertSQL(schTable *schema.Table, tableName string, colNames []string, bindNames []string, identityCol string) string

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 GetLock

func GetLock(g *sg.SQLGenerator, sch *schema.Schema, lockStr string) (string, []interface{}, error)

func IsFloatingType

func IsFloatingType(k string) bool

IsFloatingType can be used to help determine whether a certain data type is a float type. Note that it is case-sensitive.

func IsLOBType

func IsLOBType(k string) bool

func IsNumberType

func IsNumberType(k string) bool

IsNumberType can be used to help determine whether a certain data type is a number type. Note that it is case-sensitive.

func IsStringType

func IsStringType(k string) bool

IsStringType can be used to help determine whether a certain data type is a string type. Note that it is case-sensitive.

func IsTimestampType

func IsTimestampType(k string) bool

IsTimestampType can be used to help determine whether a certain data type is a number type. Note that it is case-sensitive.

func MakeColumnPointers

func MakeColumnPointers(s *sg.SQLGenerator, schTable *schema.Table, columnNames []string, columnTypes []*sql.ColumnType) ([]interface{}, error)

func New

func New(g *sg.SQLGenerator) *sg.SQLGenerator

New shows off a sort of inheritance/composition-using-vtables approach. It receives the SQLGenerator composed by Core and then overrides any methods that it needs to. In some instances, this could be all methods, or hardly any.

func ReleaseLock

func ReleaseLock(g *sg.SQLGenerator, sch *schema.Schema, lockStr string) (string, []interface{}, error)

func RenderBindingValueWithInt

func RenderBindingValueWithInt(f *schema.Column, i int) string

func RenderBindingValueWithIntNoColons

func RenderBindingValueWithIntNoColons(f *schema.Column, i int) string

func RenderCreateColumn

func RenderCreateColumn(sg *sg.SQLGenerator, f *schema.Column) string

func RenderInsertValue

func RenderInsertValue(bindI *int, f *schema.Column, value interface{}) (interface{}, error)

Types

type LobDST

type LobDST string

LobDST helps us to implement custom support for goracle.Lob

func (*LobDST) Scan

func (l *LobDST) Scan(src interface{}) error

Scan is necessary here to deal with oracle BLOB/CLOB data type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL