SQLL

package
v0.0.0-...-3a1ef6a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseRows

type ParseRows func(*sql.Rows) per.IQueryResult

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

Jump to

Keyboard shortcuts

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