Documentation
¶
Index ¶
- Variables
- type Adapter
- type Ext
- type QueryLogger
- type SQLiteAdapter
- func (adapter *SQLiteAdapter) Close() error
- func (adapter *SQLiteAdapter) Create() error
- func (adapter *SQLiteAdapter) DBX() Ext
- func (adapter *SQLiteAdapter) Find(ctx context.Context, dest interface{}) error
- func (adapter *SQLiteAdapter) Get(ctx context.Context, dest interface{}, qstr string, args ...interface{}) error
- func (adapter *SQLiteAdapter) Insert(ctx context.Context, ent interface{}) (int, error)
- func (adapter *SQLiteAdapter) MultiInsert(ctx context.Context, ents []interface{}) ([]int, error)
- func (adapter *SQLiteAdapter) Open() error
- func (adapter *SQLiteAdapter) Select(ctx context.Context, dest interface{}, qstr string, args ...interface{}) error
- func (adapter *SQLiteAdapter) Sqrl() sq.StatementBuilderType
- func (adapter *SQLiteAdapter) SupportsSpatialFunctions() bool
- func (adapter *SQLiteAdapter) TableExists(t string) (bool, error)
- func (adapter *SQLiteAdapter) Tx(cb func(Adapter) error) error
- func (adapter *SQLiteAdapter) Update(ctx context.Context, ent interface{}, columns ...string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MapperCache = tldb.MapperCache
Functions ¶
This section is empty.
Types ¶
type QueryLogger ¶
type QueryLogger = querylogger.QueryLogger
type SQLiteAdapter ¶
type SQLiteAdapter struct {
DBURL string
// contains filtered or unexported fields
}
SQLiteAdapter provides support for SQLite.
func (*SQLiteAdapter) Create ¶
func (adapter *SQLiteAdapter) Create() error
Create the database if necessary.
func (*SQLiteAdapter) DBX ¶
func (adapter *SQLiteAdapter) DBX() Ext
DBX returns the underlying Sqlx DB or Tx.
func (*SQLiteAdapter) Find ¶
func (adapter *SQLiteAdapter) Find(ctx context.Context, dest interface{}) error
Find finds a single entity based on the EntityID()
func (*SQLiteAdapter) Get ¶
func (adapter *SQLiteAdapter) Get(ctx context.Context, dest interface{}, qstr string, args ...interface{}) error
Get wraps sqlx.Get
func (*SQLiteAdapter) Insert ¶
func (adapter *SQLiteAdapter) Insert(ctx context.Context, ent interface{}) (int, error)
Insert builds and executes an insert statement for the given entity.
func (*SQLiteAdapter) MultiInsert ¶
func (adapter *SQLiteAdapter) MultiInsert(ctx context.Context, ents []interface{}) ([]int, error)
MultiInsert inserts multiple entities.
func (*SQLiteAdapter) Select ¶
func (adapter *SQLiteAdapter) Select(ctx context.Context, dest interface{}, qstr string, args ...interface{}) error
Select wraps sqlx.Select
func (*SQLiteAdapter) Sqrl ¶
func (adapter *SQLiteAdapter) Sqrl() sq.StatementBuilderType
Sqrl returns a properly configured Squirrel StatementBuilder.
func (*SQLiteAdapter) SupportsSpatialFunctions ¶ added in v1.3.0
func (adapter *SQLiteAdapter) SupportsSpatialFunctions() bool
SupportsSpatialFunctions returns false as SQLite does not support PostGIS spatial functions.
func (*SQLiteAdapter) TableExists ¶
func (adapter *SQLiteAdapter) TableExists(t string) (bool, error)
TableExists returns true if the requested table exists
Click to show internal directories.
Click to hide internal directories.