Documentation ¶
Index ¶
- type ParseRows
- type SQLLightQueryExecutor
- func (handler *SQLLightQueryExecutor) ExecuteInsertQuery(query string, params ...interface{}) per.IQueryResult
- func (handler *SQLLightQueryExecutor) ExecuteQuery(query string, params ...interface{}) per.IQueryResult
- func (handler *SQLLightQueryExecutor) ExecuteResult(query string, parser ParseRows, params ...interface{}) per.IQueryResult
- type SQLLiteDatastore
- func (sqlds *SQLLiteDatastore) CreateStructures() per.IQueryResult
- func (sqlds *SQLLiteDatastore) GetAllStorageHandlers() map[string]per.IStorageHandler
- func (sqlds *SQLLiteDatastore) GetDatabase() *sql.DB
- func (sqlds *SQLLiteDatastore) GetStorageHandler(name string) (per.IStorageHandler, bool)
- func (sqlds *SQLLiteDatastore) Open()
- func (sqlds *SQLLiteDatastore) RemoveStorageHandler(name string) bool
- func (sqlds *SQLLiteDatastore) SetStorageHander(name string, handler per.IStorageHandler)
- type SQLLiteQueryResult
- func NewDataQueryResult(succes bool, items []per.IDataItem) SQLLiteQueryResult
- func NewEmptyFailedSQLLiteQueryResult() SQLLiteQueryResult
- func NewEmptySucceedSQLLiteQueryResult() SQLLiteQueryResult
- func NewInsertRowsQueryResult(val int64) SQLLiteQueryResult
- func NewRowsAffectedQueryResult(val int64) SQLLiteQueryResult
- func ResultToSQLLiteQueryResult(data per.IQuery) SQLLiteQueryResult
- type SQLLiteTableHandler
- func (handler *SQLLiteTableHandler) ConvertResult(data per.IQueryResult) SQLLiteQueryResult
- func (handler *SQLLiteTableHandler) Create(data per.IDataItem) per.IQueryResult
- func (handler *SQLLiteTableHandler) CreateC(data per.IDataItem) SQLLiteQueryResult
- func (handler *SQLLiteTableHandler) CreateStructures() per.IQueryResult
- func (handler *SQLLiteTableHandler) Delete(data per.IDataItem) per.IQueryResult
- func (handler *SQLLiteTableHandler) DeleteC(data per.IDataItem) SQLLiteQueryResult
- func (handler *SQLLiteTableHandler) GetPersistantStorage() per.IPersistantStorage
- func (handler *SQLLiteTableHandler) ParseRows(rows *sql.Rows) per.IQueryResult
- func (handler *SQLLiteTableHandler) Read(data per.IDataItem) per.IQueryResult
- func (handler *SQLLiteTableHandler) ReadAll() per.IQueryResult
- func (handler *SQLLiteTableHandler) ReadAllC() SQLLiteQueryResult
- func (handler *SQLLiteTableHandler) ReadC(data per.IDataItem) SQLLiteQueryResult
- func (handler *SQLLiteTableHandler) SetPersistantStorage(persistant per.IPersistantStorage)
- func (handler *SQLLiteTableHandler) Update(data per.IDataItem) per.IQueryResult
- func (handler *SQLLiteTableHandler) UpdateC(data per.IDataItem) SQLLiteQueryResult
- func (handler *SQLLiteTableHandler) Wipe() per.IQueryResult
- func (handler *SQLLiteTableHandler) WipeC() SQLLiteQueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLLightQueryExecutor ¶
type SQLLightQueryExecutor struct {
Parent *SQLLiteDatastore
}
func NewSQLLightQueryExecutor ¶
func NewSQLLightQueryExecutor(datastore *SQLLiteDatastore) *SQLLightQueryExecutor
func (*SQLLightQueryExecutor) ExecuteInsertQuery ¶
func (handler *SQLLightQueryExecutor) ExecuteInsertQuery(query string, params ...interface{}) per.IQueryResult
func (*SQLLightQueryExecutor) ExecuteQuery ¶
func (handler *SQLLightQueryExecutor) ExecuteQuery(query string, params ...interface{}) per.IQueryResult
func (*SQLLightQueryExecutor) ExecuteResult ¶
func (handler *SQLLightQueryExecutor) ExecuteResult(query string, parser ParseRows, params ...interface{}) per.IQueryResult
type SQLLiteDatastore ¶
type SQLLiteDatastore struct { sl.AppLogger per.IPersistantStorage Filename string StorageHandlers map[string]per.IStorageHandler // contains filtered or unexported fields }
func CreateOpenSQLLiteDatastore ¶
func CreateOpenSQLLiteDatastore(filename string) *SQLLiteDatastore
func CreateSQLLiteDatastore ¶
func CreateSQLLiteDatastore(filename string) *SQLLiteDatastore
func (*SQLLiteDatastore) CreateStructures ¶
func (sqlds *SQLLiteDatastore) CreateStructures() per.IQueryResult
func (*SQLLiteDatastore) GetAllStorageHandlers ¶
func (sqlds *SQLLiteDatastore) GetAllStorageHandlers() map[string]per.IStorageHandler
func (*SQLLiteDatastore) GetDatabase ¶
func (sqlds *SQLLiteDatastore) GetDatabase() *sql.DB
func (*SQLLiteDatastore) GetStorageHandler ¶
func (sqlds *SQLLiteDatastore) GetStorageHandler(name string) (per.IStorageHandler, bool)
func (*SQLLiteDatastore) Open ¶
func (sqlds *SQLLiteDatastore) Open()
func (*SQLLiteDatastore) RemoveStorageHandler ¶
func (sqlds *SQLLiteDatastore) RemoveStorageHandler(name string) bool
func (*SQLLiteDatastore) SetStorageHander ¶
func (sqlds *SQLLiteDatastore) SetStorageHander(name string, handler per.IStorageHandler)
type SQLLiteQueryResult ¶
type SQLLiteQueryResult struct { per.IQueryResult `json:"-"` Results []per.IDataItem `json:"results,omitempty"` Result per.IDataItem `json:"result,omitempty"` RowsAffected int64 `json:"rowsaffected,omitempty"` LastInsertId int64 `json:"lastinserti,omitempty"` Succeeded bool `json:"succeeded,omitempty"` ErrorData error `json:"errordata,omitempty"` }
func NewDataQueryResult ¶
func NewDataQueryResult(succes bool, items []per.IDataItem) SQLLiteQueryResult
func NewEmptyFailedSQLLiteQueryResult ¶
func NewEmptyFailedSQLLiteQueryResult() SQLLiteQueryResult
func NewEmptySucceedSQLLiteQueryResult ¶
func NewEmptySucceedSQLLiteQueryResult() SQLLiteQueryResult
func NewInsertRowsQueryResult ¶
func NewInsertRowsQueryResult(val int64) SQLLiteQueryResult
func NewRowsAffectedQueryResult ¶
func NewRowsAffectedQueryResult(val int64) SQLLiteQueryResult
func ResultToSQLLiteQueryResult ¶
func ResultToSQLLiteQueryResult(data per.IQuery) SQLLiteQueryResult
func (SQLLiteQueryResult) Error ¶
func (res SQLLiteQueryResult) Error() error
func (SQLLiteQueryResult) QuerySucceeded ¶
func (res SQLLiteQueryResult) QuerySucceeded() bool
type SQLLiteTableHandler ¶
type SQLLiteTableHandler struct { per.IStorageHandler Parent *SQLLiteDatastore Executor *SQLLightQueryExecutor }
func NewSQLLiteTableHandler ¶
func NewSQLLiteTableHandler(datastore *SQLLiteDatastore) *SQLLiteTableHandler
func (*SQLLiteTableHandler) ConvertResult ¶
func (handler *SQLLiteTableHandler) ConvertResult(data per.IQueryResult) SQLLiteQueryResult
func (*SQLLiteTableHandler) Create ¶
func (handler *SQLLiteTableHandler) Create(data per.IDataItem) per.IQueryResult
func (*SQLLiteTableHandler) CreateC ¶
func (handler *SQLLiteTableHandler) CreateC(data per.IDataItem) SQLLiteQueryResult
Conversion of results
func (*SQLLiteTableHandler) CreateStructures ¶
func (handler *SQLLiteTableHandler) CreateStructures() per.IQueryResult
func (*SQLLiteTableHandler) Delete ¶
func (handler *SQLLiteTableHandler) Delete(data per.IDataItem) per.IQueryResult
func (*SQLLiteTableHandler) DeleteC ¶
func (handler *SQLLiteTableHandler) DeleteC(data per.IDataItem) SQLLiteQueryResult
Conversion of results
func (*SQLLiteTableHandler) GetPersistantStorage ¶
func (handler *SQLLiteTableHandler) GetPersistantStorage() per.IPersistantStorage
Start IStorage Handler
func (*SQLLiteTableHandler) ParseRows ¶
func (handler *SQLLiteTableHandler) ParseRows(rows *sql.Rows) per.IQueryResult
empty Parserows example
func (*SQLLiteTableHandler) Read ¶
func (handler *SQLLiteTableHandler) Read(data per.IDataItem) per.IQueryResult
func (*SQLLiteTableHandler) ReadAll ¶
func (handler *SQLLiteTableHandler) ReadAll() per.IQueryResult
func (*SQLLiteTableHandler) ReadAllC ¶
func (handler *SQLLiteTableHandler) ReadAllC() SQLLiteQueryResult
Conversion of results
func (*SQLLiteTableHandler) ReadC ¶
func (handler *SQLLiteTableHandler) ReadC(data per.IDataItem) SQLLiteQueryResult
Conversion of results
func (*SQLLiteTableHandler) SetPersistantStorage ¶
func (handler *SQLLiteTableHandler) SetPersistantStorage(persistant per.IPersistantStorage)
func (*SQLLiteTableHandler) Update ¶
func (handler *SQLLiteTableHandler) Update(data per.IDataItem) per.IQueryResult
func (*SQLLiteTableHandler) UpdateC ¶
func (handler *SQLLiteTableHandler) UpdateC(data per.IDataItem) SQLLiteQueryResult
Conversion of results
func (*SQLLiteTableHandler) Wipe ¶
func (handler *SQLLiteTableHandler) Wipe() per.IQueryResult
func (*SQLLiteTableHandler) WipeC ¶
func (handler *SQLLiteTableHandler) WipeC() SQLLiteQueryResult
Conversion of results
Click to show internal directories.
Click to hide internal directories.