Documentation
¶
Index ¶
- Constants
- type Sqliter
- func (s *Sqliter) Close()
- func (s *Sqliter) CreateTable(sample interface{}) error
- func (s *Sqliter) Delete(sample interface{}, where string, args ...interface{}) error
- func (s *Sqliter) DeleteFrom(table, where string, args ...interface{}) error
- func (s *Sqliter) Exec(q string, args ...any) (sql.Result, error)
- func (s *Sqliter) Insert(obj interface{}) (int64, error)
- func (s *Sqliter) ReadMany(outPtr interface{}, where string, args ...interface{}) error
- func (s *Sqliter) ReadOne(outPtr interface{}, where string, args ...interface{}) error
- func (s *Sqliter) Select(outPtr interface{}, q string, args ...interface{}) error
- func (s *Sqliter) TableName(sample interface{}) (string, error)
- func (s *Sqliter) Update(obj interface{}, where string, args ...interface{}) error
- func (s *Sqliter) Upsert(obj interface{}, where string, args ...interface{}) (int64, error)
- type StructField
Constants ¶
View Source
const InMemory = ":memory:"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sqliter ¶
type Sqliter struct {
// contains filtered or unexported fields
}
func (*Sqliter) CreateTable ¶
CreateTable takes an example object (or nill pointer to its type) and runs CREATE TABLE IF NOT EXISTS with columns read from typej.
func (*Sqliter) DeleteFrom ¶
Delete from the specified table all records matching the where clause
func (*Sqliter) ReadMany ¶
Read several records. Use where clause to specify which ones and also to inject OFFSET and LIMIT clauses.
Click to show internal directories.
Click to hide internal directories.