Documentation ¶
Index ¶
- type ColumnType
- func (colType *ColumnType) DatabaseType() string
- func (colType *ColumnType) HasLength() bool
- func (colType *ColumnType) HasNullable() bool
- func (colType *ColumnType) HasPrecisionScale() bool
- func (colType *ColumnType) Length() int64
- func (colType *ColumnType) Name() string
- func (colType *ColumnType) Nullable() bool
- func (colType *ColumnType) Numeric() bool
- func (colType *ColumnType) Precision() int64
- func (colType *ColumnType) Scale() int64
- func (colType *ColumnType) Type() reflect.Type
- type Connection
- type DBMS
- func (dbms *DBMS) DBMSHandler(ctx context.Context, runtime active.Runtime, prms parameters.ParametersAPI, ...) (dbmshndlr *DBMSHandler)
- func (dbms *DBMS) DriverCnInvoker(driver string) (dbinvoker func(string, ...interface{}) (*sql.DB, error), ...)
- func (dbms *DBMS) Execute(alias string, a ...interface{}) (exectr *Executor)
- func (dbms *DBMS) Prepair(alias string, a ...interface{}) (exectr *Executor)
- func (dbms *DBMS) Query(alias string, a ...interface{}) (reader *Reader)
- func (dbms *DBMS) Register(alias string, driver string, datasource string, a ...interface{}) (registered bool)
- func (dbms *DBMS) RegisterDriver(driver string, invokedbcall func(string, ...interface{}) (*sql.DB, error), ...)
- func (dbms *DBMS) Unregister(alias string, a ...interface{}) (unregistered bool)
- type DBMSHandler
- func (dbmshndlr *DBMSHandler) Connections() (cns []string)
- func (dbmshndlr *DBMSHandler) Dispose()
- func (dbmshndlr *DBMSHandler) DriverName(alias string) (driver string)
- func (dbmshndlr *DBMSHandler) Drivers() (drvrs []string)
- func (dbmshndlr *DBMSHandler) Exec(alias string, a ...interface{}) *Executor
- func (dbmshndlr *DBMSHandler) Execute(alias string, a ...interface{}) (exctr *Executor)
- func (dbmshndlr *DBMSHandler) Exists(alias string) (exists bool)
- func (dbmshndlr *DBMSHandler) InOut(in interface{}, out io.Writer, ioargs ...interface{}) (err error)
- func (dbmshndlr *DBMSHandler) Params() (prms parameters.ParametersAPI)
- func (dbmshndlr *DBMSHandler) Prep(alias string, a ...interface{}) *Executor
- func (dbmshndlr *DBMSHandler) Prepair(alias string, a ...interface{}) (exctr *Executor)
- func (dbmshndlr *DBMSHandler) Qry(alias string, a ...interface{}) *Reader
- func (dbmshndlr *DBMSHandler) QryArray(alias string, a ...interface{}) []interface{}
- func (dbmshndlr *DBMSHandler) QryMap(alias string, a ...interface{}) map[string]interface{}
- func (dbmshndlr *DBMSHandler) Query(alias string, a ...interface{}) (reader *Reader)
- func (dbmshndlr *DBMSHandler) QueryArray(alias string, a ...interface{}) (arr []interface{})
- func (dbmshndlr *DBMSHandler) QueryMap(alias string, a ...interface{}) (mp map[string]interface{})
- func (dbmshndlr *DBMSHandler) Reg(alias string, driver string, datasource string, a ...interface{}) bool
- func (dbmshndlr *DBMSHandler) Register(alias string, driver string, datasource string, a ...interface{}) (registered bool)
- func (dbmshndlr *DBMSHandler) Status(alias string) (status map[string]interface{}, err error)
- func (dbmshndlr *DBMSHandler) TryConnect(dbtype string, datasource string) (connected interface{})
- func (dbmshndlr *DBMSHandler) Unreg(alias string) bool
- func (dbmshndlr *DBMSHandler) Unregister(alias string) (unregistered bool)
- type DataReader
- type ErrorFunc
- type ExecErrorFunc
- type ExecFunc
- type Executor
- type ExecutorFinalizeFunc
- type ExecutorInitFunc
- type PrepColumnsFunc
- type PrepDataFunc
- type Reader
- func (rdr *Reader) AppendReader(rdrs ...*Reader) (appended bool)
- func (rdr *Reader) AsArray(cols ...string) (arr []interface{})
- func (rdr *Reader) AsMap(cols ...string) (mp map[string]interface{})
- func (rdr *Reader) CSVReader(a ...interface{}) (eofr *iorw.EOFCloseSeekReader)
- func (rdr *Reader) Close() (err error)
- func (rdr *Reader) ColumnTypes(cols ...string) (clstpes []*ColumnType)
- func (rdr *Reader) Columns(cols ...string) (cls []string)
- func (rdr *Reader) Data(cols ...string) (dspdata []interface{})
- func (rdr *Reader) DataMap(cols ...string) (datamap map[string]interface{})
- func (rdr *Reader) DataSet(cols ...string) (dataset []interface{}, err error)
- func (rdr *Reader) DataSetMap(cols ...string) (datasetmap []map[string]interface{})
- func (rdr *Reader) ExecEachPrepaired(execerr func(*Executor, int, error), execs ...*Executor) (err error)
- func (rdr *Reader) Field(name string) (val interface{})
- func (rdr *Reader) ForEach(eachitem func(*Reader, bool, bool) bool) (err error)
- func (rdr *Reader) ForEachColumn(eachitem func(string, int, bool, bool), cols ...string) (err error)
- func (rdr *Reader) ForEachColumnType(eachitem func(*ColumnType, int, bool, bool), cols ...string) (err error)
- func (rdr *Reader) ForEachData(eachitem func([]interface{}, int64, bool, bool) bool, cols ...string) (err error)
- func (rdr *Reader) ForEachDataMap(eachitem func(map[string]interface{}, int64, bool, bool) bool, cols ...string) (err error)
- func (rdr *Reader) ForEachDataMapSet(eachitem func([]map[string]interface{}, int64, bool, bool) bool, ...) (err error)
- func (rdr *Reader) InsertAfterReader(aftrrdr *Reader, rdrs ...*Reader) (inserted bool)
- func (rdr *Reader) InsertBeforeReader(bfrrdr *Reader, rdrs ...*Reader) (inserted bool)
- func (rdr *Reader) IsFirst() (first bool)
- func (rdr *Reader) IsLast() (last bool)
- func (rdr *Reader) JSONReader(layout string, cols ...string) (eofr *iorw.EOFCloseSeekReader)
- func (rdr *Reader) Next() (next bool, err error)
- func (rdr *Reader) NextReader() (nxtrdr *Reader)
- func (rdr *Reader) PreAppendReader(rdrs ...*Reader) (preappended bool)
- func (rdr *Reader) Prep() (err error)
- func (rdr *Reader) RemoveReader(rdrstormv ...*Reader) (removed bool)
- func (rdr *Reader) ToCSV(w io.Writer, a ...interface{}) (err error)
- func (rdr *Reader) ToJSON(w io.Writer, layout string, cols ...string) (err error)
- type ReaderFinalizeFunc
- type ReaderInitFunc
- type RowErrorFunc
- type RowFunc
- type RowNextFunc
- type RowSelectFunc
- type RowsAPI
- type SqlRows
- func (sqlrws *SqlRows) Close() (err error)
- func (sqlrws *SqlRows) ColumnTypes(cols ...string) (coltypes []*ColumnType, err error)
- func (sqlrws *SqlRows) Columns(col ...string) (cols []string, err error)
- func (sqlrws *SqlRows) Context() (ctx context.Context)
- func (sqlrws *SqlRows) Data(cols ...string) (data []interface{})
- func (sqlrws *SqlRows) DisplayData(cols ...string) (displaydata []interface{})
- func (sqlrws *SqlRows) Err() (err error)
- func (sqlrws *SqlRows) Field(name string) (val interface{})
- func (sqlrws *SqlRows) FieldByIndex(index int) (val interface{})
- func (sqlrws *SqlRows) FieldIndex(name string) (index int)
- func (sqlrws *SqlRows) Next() (next bool)
- func (sqlrws *SqlRows) Scan(...) (err error)
- type Statement
- type StatementHandler
- type StatementHandlerFunc
- type StreamReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnType ¶
type ColumnType struct {
// contains filtered or unexported fields
}
ColumnType structure defining column definition
func (*ColumnType) DatabaseType ¶
func (colType *ColumnType) DatabaseType() string
DatabaseType ColumnType underlying db type as defined by driver of Connection
func (*ColumnType) HasLength ¶
func (colType *ColumnType) HasLength() bool
HasLength ColumnType content has Length definition
func (*ColumnType) HasNullable ¶
func (colType *ColumnType) HasNullable() bool
HasNullable ColumnType content has NULL able content
func (*ColumnType) HasPrecisionScale ¶
func (colType *ColumnType) HasPrecisionScale() bool
HasPrecisionScale ColumnType content has PrecisionScale
func (*ColumnType) Length ¶
func (colType *ColumnType) Length() int64
Length ColumnType content lenth must be used in conjunction with HasLength
func (*ColumnType) Nullable ¶
func (colType *ColumnType) Nullable() bool
Nullable ColumnType content is Nullable
func (*ColumnType) Numeric ¶
func (colType *ColumnType) Numeric() bool
Numeric ColumnType is Numeric() bool
func (*ColumnType) Precision ¶
func (colType *ColumnType) Precision() int64
Precision ColumnType numeric Precision. Used in conjunction with HasPrecisionScale
func (*ColumnType) Scale ¶
func (colType *ColumnType) Scale() int64
Scale ColumnType Scale. Used in conjunction with HasPrecisionScale
func (*ColumnType) Type ¶
func (colType *ColumnType) Type() reflect.Type
Type ColumnType reflect.Type as specified by golang sql/database
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(dbms *DBMS, driverName, dataSource string) (cn *Connection)
func (*Connection) Dispose ¶
func (cn *Connection) Dispose() (err error)
func (*Connection) Stmnt ¶
func (cn *Connection) Stmnt() (stmnt *Statement)
type DBMS ¶
type DBMS struct {
// contains filtered or unexported fields
}
func (*DBMS) DBMSHandler ¶
func (dbms *DBMS) DBMSHandler(ctx context.Context, runtime active.Runtime, prms parameters.ParametersAPI, cchng *concurrent.Map, fs *fsutils.FSUtils, callprepstmnt StatementHandlerFunc) (dbmshndlr *DBMSHandler)
func (*DBMS) DriverCnInvoker ¶
func (*DBMS) RegisterDriver ¶
func (*DBMS) Unregister ¶
type DBMSHandler ¶
type DBMSHandler struct { CallPrepStatement StatementHandlerFunc // contains filtered or unexported fields }
func (*DBMSHandler) Connections ¶
func (dbmshndlr *DBMSHandler) Connections() (cns []string)
func (*DBMSHandler) Dispose ¶
func (dbmshndlr *DBMSHandler) Dispose()
func (*DBMSHandler) DriverName ¶
func (dbmshndlr *DBMSHandler) DriverName(alias string) (driver string)
func (*DBMSHandler) Drivers ¶
func (dbmshndlr *DBMSHandler) Drivers() (drvrs []string)
func (*DBMSHandler) Exec ¶
func (dbmshndlr *DBMSHandler) Exec(alias string, a ...interface{}) *Executor
func (*DBMSHandler) Execute ¶
func (dbmshndlr *DBMSHandler) Execute(alias string, a ...interface{}) (exctr *Executor)
func (*DBMSHandler) Exists ¶
func (dbmshndlr *DBMSHandler) Exists(alias string) (exists bool)
func (*DBMSHandler) InOut ¶
func (dbmshndlr *DBMSHandler) InOut(in interface{}, out io.Writer, ioargs ...interface{}) (err error)
func (*DBMSHandler) Params ¶
func (dbmshndlr *DBMSHandler) Params() (prms parameters.ParametersAPI)
func (*DBMSHandler) Prep ¶
func (dbmshndlr *DBMSHandler) Prep(alias string, a ...interface{}) *Executor
func (*DBMSHandler) Prepair ¶
func (dbmshndlr *DBMSHandler) Prepair(alias string, a ...interface{}) (exctr *Executor)
func (*DBMSHandler) Qry ¶
func (dbmshndlr *DBMSHandler) Qry(alias string, a ...interface{}) *Reader
func (*DBMSHandler) QryArray ¶
func (dbmshndlr *DBMSHandler) QryArray(alias string, a ...interface{}) []interface{}
func (*DBMSHandler) QryMap ¶
func (dbmshndlr *DBMSHandler) QryMap(alias string, a ...interface{}) map[string]interface{}
func (*DBMSHandler) Query ¶
func (dbmshndlr *DBMSHandler) Query(alias string, a ...interface{}) (reader *Reader)
func (*DBMSHandler) QueryArray ¶
func (dbmshndlr *DBMSHandler) QueryArray(alias string, a ...interface{}) (arr []interface{})
func (*DBMSHandler) QueryMap ¶
func (dbmshndlr *DBMSHandler) QueryMap(alias string, a ...interface{}) (mp map[string]interface{})
func (*DBMSHandler) Reg ¶
func (dbmshndlr *DBMSHandler) Reg(alias string, driver string, datasource string, a ...interface{}) bool
func (*DBMSHandler) Register ¶
func (dbmshndlr *DBMSHandler) Register(alias string, driver string, datasource string, a ...interface{}) (registered bool)
func (*DBMSHandler) Status ¶
func (dbmshndlr *DBMSHandler) Status(alias string) (status map[string]interface{}, err error)
func (*DBMSHandler) TryConnect ¶
func (dbmshndlr *DBMSHandler) TryConnect(dbtype string, datasource string) (connected interface{})
func (*DBMSHandler) Unreg ¶
func (dbmshndlr *DBMSHandler) Unreg(alias string) bool
func (*DBMSHandler) Unregister ¶
func (dbmshndlr *DBMSHandler) Unregister(alias string) (unregistered bool)
type DataReader ¶
type DataReader struct {
// contains filtered or unexported fields
}
func (*DataReader) Close ¶
func (datardr *DataReader) Close() (err error)
func (*DataReader) Columns ¶
func (datardr *DataReader) Columns() (cols []string, err error)
func (*DataReader) Next ¶
func (datardr *DataReader) Next() (next bool, err error)
type Executor ¶
type Executor struct { EventClose func(*Executor) // contains filtered or unexported fields }
func NewExecutor ¶
func (*Executor) LastInsertedId ¶
func (*Executor) RowsAffected ¶
type ExecutorFinalizeFunc ¶
type ExecutorInitFunc ¶
type PrepColumnsFunc ¶
type PrepDataFunc ¶
type Reader ¶
type Reader struct { RowNr int64 EventPrepColumns PrepColumnsFunc EventPrepData PrepDataFunc EventInit ReaderInitFunc EventError ErrorFunc EventNext RowNextFunc EventSelect RowSelectFunc EventRow RowFunc EventRowError RowErrorFunc EventFinalize ReaderFinalizeFunc EventClose func(*Reader) CastTypeValue func(interface{}, interface{}) (interface{}, bool) // contains filtered or unexported fields }
func NewReader ¶
func NewReader(strmrdrd interface{}, strmtpe string, strmsttngs map[string]interface{}, stmnt *Statement, oninit interface{}, onprepcolumns interface{}, onprepdata interface{}, onnext interface{}, onselect interface{}, onrow interface{}, onrowerror interface{}, onerror interface{}, onfinalize interface{}, runtime active.Runtime) (reader *Reader)
func (*Reader) AppendReader ¶
func (*Reader) CSVReader ¶
func (rdr *Reader) CSVReader(a ...interface{}) (eofr *iorw.EOFCloseSeekReader)
func (*Reader) ColumnTypes ¶
func (rdr *Reader) ColumnTypes(cols ...string) (clstpes []*ColumnType)
func (*Reader) DataMap ¶
DataMap return Displayable data in the form of a map[string]interface{} column and values
func (*Reader) DataSetMap ¶
func (*Reader) ExecEachPrepaired ¶
func (*Reader) ForEachColumn ¶
func (*Reader) ForEachColumnType ¶
func (*Reader) ForEachData ¶
func (*Reader) ForEachDataMap ¶
func (*Reader) ForEachDataMapSet ¶
func (*Reader) InsertAfterReader ¶
func (*Reader) InsertBeforeReader ¶
func (*Reader) JSONReader ¶
func (rdr *Reader) JSONReader(layout string, cols ...string) (eofr *iorw.EOFCloseSeekReader)
func (*Reader) NextReader ¶
func (*Reader) PreAppendReader ¶
func (*Reader) RemoveReader ¶
type ReaderFinalizeFunc ¶
type ReaderInitFunc ¶
type RowNextFunc ¶
type RowSelectFunc ¶
type RowsAPI ¶
type RowsAPI interface { Close() error ColumnTypes(...string) ([]*ColumnType, error) Columns(...string) ([]string, error) Data(...string) []interface{} DisplayData(...string) []interface{} Field(string) interface{} FieldByIndex(int) interface{} FieldIndex(string) int Err() error Next() bool Context() context.Context //NextResultSet() bool Scan(castTypeVal func(valToCast interface{}, colType interface{}) (val interface{}, scanned bool)) error }
type SqlRows ¶
type SqlRows struct {
// contains filtered or unexported fields
}
func (*SqlRows) ColumnTypes ¶
func (sqlrws *SqlRows) ColumnTypes(cols ...string) (coltypes []*ColumnType, err error)
func (*SqlRows) DisplayData ¶
func (*SqlRows) FieldByIndex ¶
func (*SqlRows) FieldIndex ¶
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
func NewStatement ¶
func NewStatement(cn *Connection) (stmnt *Statement)
func (*Statement) Prepair ¶
func (stmnt *Statement) Prepair(prms *parameters.Parameters, rdr *Reader, args map[string]interface{}, a ...interface{}) (preperr error)
type StatementHandler ¶
type StatementHandler interface {
Prepair(...interface{}) []interface{}
}
type StatementHandlerFunc ¶
type StatementHandlerFunc func(a ...interface{}) []interface{}
func (StatementHandlerFunc) Prepair ¶
func (stmnthndlfnc StatementHandlerFunc) Prepair(a ...interface{}) []interface{}
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
func (*StreamReader) Columns ¶
func (strmrdr *StreamReader) Columns() (cols []string, err error)
func (*StreamReader) Next ¶
func (strmrdr *StreamReader) Next() (next bool, err error)
func (*StreamReader) PrepColumns ¶
func (strmrdr *StreamReader) PrepColumns(cols ...string)
func (*StreamReader) PrepData ¶
func (strmrdr *StreamReader) PrepData(data ...interface{})