Documentation ¶
Index ¶
- func CurrentTime(ctx context.Context) *time.Time
- func TimeFromTimestampValue(v string) (time.Time, error)
- func WithCurrentTime(ctx context.Context, now time.Time) context.Context
- type ColumnType
- type ZetaSQLiteConn
- func (c *ZetaSQLiteConn) AddNamePath(path string)
- func (c *ZetaSQLiteConn) Begin() (driver.Tx, error)
- func (c *ZetaSQLiteConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (s *ZetaSQLiteConn) CheckNamedValue(value *driver.NamedValue) error
- func (c *ZetaSQLiteConn) Close() error
- func (c *ZetaSQLiteConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
- func (c *ZetaSQLiteConn) NamePath() []string
- func (c *ZetaSQLiteConn) Prepare(query string) (driver.Stmt, error)
- func (c *ZetaSQLiteConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- func (c *ZetaSQLiteConn) SetNamePath(path []string)
- type ZetaSQLiteDriver
- type ZetaSQLiteTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentTime ¶ added in v0.3.0
CurrentTime gets the time specified by WithCurrentTime.
func TimeFromTimestampValue ¶ added in v0.6.6
TimeFromTimestampValue zetasqlite returns string values by default for timestamp values. This function is a helper function to convert that value to time.Time type.
func WithCurrentTime ¶ added in v0.3.0
WithCurrentTime use to replace the current time with the specified time. To replace the time, you need to pass the returned context as an argument to QueryContext. `CURRENT_DATE`, `CURRENT_DATETIME`, `CURRENT_TIME`, `CURRENT_TIMESTAMP` functions are targeted.
Types ¶
type ColumnType ¶ added in v0.6.2
func UnmarshalDatabaseTypeName ¶ added in v0.6.2
func UnmarshalDatabaseTypeName(typ string) (*ColumnType, error)
type ZetaSQLiteConn ¶
type ZetaSQLiteConn struct {
// contains filtered or unexported fields
}
func (*ZetaSQLiteConn) AddNamePath ¶
func (c *ZetaSQLiteConn) AddNamePath(path string)
func (*ZetaSQLiteConn) CheckNamedValue ¶
func (s *ZetaSQLiteConn) CheckNamedValue(value *driver.NamedValue) error
func (*ZetaSQLiteConn) Close ¶
func (c *ZetaSQLiteConn) Close() error
func (*ZetaSQLiteConn) ExecContext ¶
func (c *ZetaSQLiteConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
func (*ZetaSQLiteConn) NamePath ¶
func (c *ZetaSQLiteConn) NamePath() []string
func (*ZetaSQLiteConn) Prepare ¶
func (c *ZetaSQLiteConn) Prepare(query string) (driver.Stmt, error)
func (*ZetaSQLiteConn) QueryContext ¶
func (c *ZetaSQLiteConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
func (*ZetaSQLiteConn) SetNamePath ¶
func (c *ZetaSQLiteConn) SetNamePath(path []string)
type ZetaSQLiteDriver ¶
type ZetaSQLiteDriver struct {
ConnectHook func(*ZetaSQLiteConn) error
}
type ZetaSQLiteTx ¶
type ZetaSQLiteTx struct {
// contains filtered or unexported fields
}
func (*ZetaSQLiteTx) Commit ¶
func (tx *ZetaSQLiteTx) Commit() error
func (*ZetaSQLiteTx) Rollback ¶
func (tx *ZetaSQLiteTx) Rollback() error
Click to show internal directories.
Click to hide internal directories.