abstract_sql

package
v0.0.0-...-d8c34b0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractSqlStore

type AbstractSqlStore struct {
	DB               *sql.DB
	SqlInsert        string
	SqlUpdate        string
	SqlFind          string
	SqlDelete        string
	SqlListExclusive string
	SqlListInclusive string
}

func (*AbstractSqlStore) BeginTransaction

func (store *AbstractSqlStore) BeginTransaction(ctx context.Context) (context.Context, error)

func (*AbstractSqlStore) CommitTransaction

func (store *AbstractSqlStore) CommitTransaction(ctx context.Context) error

func (*AbstractSqlStore) DeleteEntry

func (store *AbstractSqlStore) DeleteEntry(ctx context.Context, fullpath filer2.FullPath) error

func (*AbstractSqlStore) FindEntry

func (store *AbstractSqlStore) FindEntry(ctx context.Context, fullpath filer2.FullPath) (*filer2.Entry, error)

func (*AbstractSqlStore) InsertEntry

func (store *AbstractSqlStore) InsertEntry(ctx context.Context, entry *filer2.Entry) (err error)

func (*AbstractSqlStore) ListDirectoryEntries

func (store *AbstractSqlStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool, limit int) (entries []*filer2.Entry, err error)

func (*AbstractSqlStore) RollbackTransaction

func (store *AbstractSqlStore) RollbackTransaction(ctx context.Context) error

func (*AbstractSqlStore) UpdateEntry

func (store *AbstractSqlStore) UpdateEntry(ctx context.Context, entry *filer2.Entry) (err error)

type TxOrDB

type TxOrDB interface {
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
}

Jump to

Keyboard shortcuts

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