{"modulePath":"github.com/viant/xdatly/handler","version":"v0.0.0-20261113075720-88fc13248650","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sqlx\n\n## Types\n\n```go\ntype Deleter interface {\n\tFlusher\n\tDelete(tableName string, data interface{}) error\n}\n```\n\n```go\ntype Executor interface {\n\tFlusher\n\tExecute(DML string, options ...ExecutorOption) error\n}\n```\n\n```go\ntype ExecutorOption func(o *ExecutorOptions)\n```\n\n```go\nfunc WithExecutorArgs(args ...interface{}) ExecutorOption\n```\n\n```go\ntype ExecutorOptions struct {\n\tArgs []interface{}\n}\n```\n\n```go\ntype Flusher interface {\n\tFlush(ctx context.Context, tableName string) error\n}\n```\n\n```go\ntype Inserter interface {\n\tFlusher\n\tInsert(tableName string, data interface{}) error\n}\n```\n\n```go\ntype Loader interface {\n\tFlusher\n\tLoad(ctx context.Context, tableName string, data interface{}) error\n}\n```\n\n```go\ntype Option func(o *Options)\n```\n\n```go\nfunc WithConnector(name string) Option\n```\n\n```go\nfunc WithSqlDB(db *sql.DB) Option\n```\n\n```go\nfunc WithSqlTx(tx *sql.Tx) Option\n```\n\n```go\ntype Options struct {\n\tWithConnector string\n\tWithDb        *sql.DB\n\tWithTx        *sql.Tx\n}\n```\n\n```go\ntype ReadOptions struct {\n\tArgs []interface{}\n}\n```\n\n```go\ntype Reader interface {\n\tRead(ctx context.Context, dest interface{}, SQL string, params ...interface{}) error\n}\n```\n\n```go\ntype ReaderOption func(o *ReadOptions)\n```\n\n```go\ntype Sequencer interface {\n\tAllocate(ctx context.Context, tableName string, dest interface{}, selector string) error\n}\n```\n\n```go\ntype Service struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(sqlx Sqlx) *Service\n```\n\n```go\nfunc (s Service) Allocate(ctx context.Context, tableName string, dest interface{}, selector string) error\n```\n\n```go\nfunc (s Service) Db(ctx context.Context) (*sql.DB, error)\n```\n\n```go\nfunc (s Service) Delete(tableName string, data interface{}) error\n```\n\n```go\nfunc (s Service) Execute(DML string, options ...ExecutorOption) error\n```\n\n```go\nfunc (s Service) Flush(ctx context.Context, tableName string) error\n```\n\n```go\nfunc (s Service) Insert(tableName string, data interface{}) error\n```\n\n```go\nfunc (s Service) Load(ctx context.Context, tableName string, data interface{}) error\n```\n\n```go\nfunc (s Service) Read(ctx context.Context, dest interface{}, SQL string, params ...interface{}) error\n```\n\n```go\nfunc (s Service) Tx(ctx context.Context) (*sql.Tx, error)\n```\n\n```go\nfunc (s Service) Update(tableName string, data interface{}) error\n```\n\n```go\nfunc (s Service) Validator() *validator.Service\n```\n\n```go\ntype Sqlx interface {\n\tSequencer\n\tInserter\n\tLoader\n\tUpdater\n\tDeleter\n\tExecutor\n\tReader\n\tDb(ctx context.Context) (*sql.DB, error)\n\tTx(ctx context.Context) (*sql.Tx, error)\n\tValidator() *validator.Service\n}\n```\n\n```go\ntype Updater interface {\n\tFlusher\n\tUpdate(tableName string, data interface{}) error\n}\n```\n\n","path":"github.com/viant/xdatly/handler/sqlx","name":"sqlx","synopsis":"","isRedistributable":true}
