Quark API surface
The public Go API of Quark v1.17.0, the version Quantum 1.42.0 certifies: 928 exported symbols in 12 packages. Quark keeps this list in acceptance/apisurface.json. Quark regenerates this file from the code in CI and fails a change whose committed copy differs, so adding or removing an exported symbol means changing the file in the same change. Removing an exported symbol is a breaking change, and the suite ships breaking changes only in a major version. This page is generated from that file at the pinned version, so it lists exactly what the check protects.
Each package links to its documentation on pkg.go.dev at this version, where every symbol has its signature and its comment.
| Package | Types | Functions | Methods | Constants | Variables |
|---|---|---|---|---|---|
quark (module root) | 118 | 131 | 398 | 23 | 23 |
cache/memory | 1 | 1 | 6 | ||
cache/redis | 2 | 1 | 6 | ||
migrate | 3 | 9 | 5 | ||
otel | 3 | 3 | 3 | 3 | |
quarkdriver | 40 | 15 | 59 | 28 | 4 |
quarkdriver/drivertest | 3 | 2 | |||
quarkdriver/drivertest/suite | 1 | ||||
quarkmigrate | 1 | 3 | 6 | ||
quarktenant | 3 | 6 | 5 | 4 | |
quarktest | 3 | ||||
seed | 1 | 5 |
quark (module root)
github.com/jcsvwinston/quark · 693 symbols · pkg.go.dev
Types
AfterCreateHookinterfaceAfterCreatefunc(context.Context) error
AfterDeleteHookinterfaceAfterDeletefunc(context.Context) error
AfterFindHookinterfaceAfterFindfunc(context.Context) error
AfterUpdateHookinterfaceAfterUpdatefunc(context.Context) error
Array[T any] struct{V []T}Lenfunc() intScanfunc(any) errorSlicefunc() []TValuefunc() (driver.Value, error)
AuditConfigstruct{UserFromContext func(context.Context) string; TenantFromContext func(context.Context) string; IncludeTables []string; ExcludeTables []string}BackfillSpecstruct{Name string; Table string; PKColumn string; BatchSize int; Process func(ctx context.Context, batchPKs []int64) error}BaseMiddlewarestruct{}WrapExecfunc(ExecFunc) ExecFuncWrapQueryfunc(QueryFunc) QueryFuncWrapQueryRowfunc(QueryRowFunc) QueryRowFunc
BaseQuerystruct{}BeforeCreateHookinterfaceBeforeCreatefunc(context.Context) error
BeforeDeleteHookinterfaceBeforeDeletefunc(context.Context) error
BeforeFindHookinterfaceBeforeFindfunc(context.Context) error
BeforeUpdateHookinterfaceBeforeUpdatefunc(context.Context) error
BindModeintCacheConfigstruct{TTL time.Duration; Tags []string; Enabled bool}CacheLockerinterfaceAcquireLockfunc(context.Context, string, time.Duration) (bool, func() error, error)
CacheStoreinterfaceDeletefunc(context.Context, string) errorGetfunc(context.Context, string) ([]byte, error)InvalidateTagsfunc(context.Context, ...string) errorSetfunc(context.Context, string, []byte, time.Duration, ...string) error
CaseBuilderstruct{}Elsefunc(Expr) *CaseBuilderToSQLfunc(Dialect, *SQLGuard) (string, []any, error)Whenfunc(Expr, Expr) *CaseBuilder
Check=quarkdriver.Check(alias)Clientstruct{}AcquireMigrationLockfunc(context.Context, string, time.Duration) (MigrationLock, error)AddForeignKeyfunc(context.Context, string, string, []string, string, []string, string, string) errorApplyPlanfunc(context.Context, Plan) errorBackfillfunc(context.Context, BackfillSpec) errorBeginTxfunc(context.Context, *sql.TxOptions) (*Tx, error)BlockedPanicCleanupsfunc() uint64Closefunc() errorCreateIndexfunc(context.Context, string, string, []string, bool) errorDeferredCommitFailuresfunc() uint64Dialectfunc() DialectDisableAuditLogfunc()EnableAuditLogfunc(context.Context, AuditConfig) errorExecfunc(context.Context, string, ...any) errorGetClientfunc(context.Context) (*Client, error)IntrospectSchemafunc(context.Context) (Schema, error)Loggerfunc() *slog.LoggerMigratefunc(context.Context, ...any) errorMigrateRegisteredfunc(context.Context) errorPlanMigrationfunc(context.Context, ...any) (Plan, error)PlanMigrationRegisteredfunc(context.Context) (Plan, error)Rawfunc() *sql.DBRawQueryfunc(context.Context, string, ...any) (*sql.Rows, error)RegisterModelfunc(...any) errorRegisteredModelsfunc() []anySyncfunc(context.Context, SyncOptions, ...any) errorTxfunc(context.Context, func(tx *Tx) error) errorUseEventBusfunc(EventBus)Validatefunc(context.Context, any) errorWithOptionsfunc(...any) (*Client, error)
ClientProviderinterfaceGetClientfunc(context.Context) (*Client, error)
Column=quarkdriver.Column(alias)ColumnTypeMapper=quarkdriver.ColumnTypeMapper(alias)Cursor[T any] struct{}Closefunc() errorErrfunc() errorNextfunc() boolScanfunc(*T) error
DBConn=quarkdriver.DBConn(alias)DBConnector=quarkdriver.DBConnector(alias)Dialect=quarkdriver.Dialect(alias)EventinterfaceKindfunc() stringPayloadfunc() anyTablefunc() string
EventBusinterfacePublishfunc(context.Context, Event) error
EventListener=quarkdriver.Listener(alias)EventPayload=quarkdriver.EventPayload(alias)ExecFuncfunc(context.Context, Executor, string, []any) (sql.Result, error)Executor=quarkdriver.Executor(alias)ExprinterfaceToSQLfunc(Dialect, *SQLGuard) (string, []any, error)
FieldMeta=schema.FieldMeta(alias)ForeignKey=quarkdriver.ForeignKey(alias)FrameBoundstringGeneratedMetastruct{ContractVersion int; ModelHash string}Index=quarkdriver.Index(alias)JSON[T any] struct{V T}Scanfunc(any) errorValuefunc() (driver.Value, error)
JoinBuilder[T any] struct{}Onfunc(string, string, string) *Query[T]OnExprfunc(Expr) *Query[T]OnRawfunc(string) *Query[T]
KeysetPage[T any] struct{Items []T; Next string; HasMore bool}Limitsstruct{MaxQueryLength int; MaxResults int; MaxJoins int; MaxWhereConditions int; QueryTimeout time.Duration; AllowRawQueries bool; SafeMigrations bool}ListenerFactorystruct{}CreateListenerfunc() (EventListener, error)
LockMode=quarkdriver.LockMode(alias)LockOptions=quarkdriver.LockOptions(alias)LoggerEventBusstruct{}Publishfunc(context.Context, Event) error
MSSQLDialectstruct{}AcquireMigrationLockfunc(context.Context, DBConnector, string, time.Duration) (MigrationLock, error)AlterColumnfunc(context.Context, quarkdriver.Executor, quarkdriver.ColumnChange) ([]string, error)AlterTableAddColumnfunc(string, string, string) stringAlterTableAlterColumnfunc(string, string, string) stringAlterTableDropColumnfunc(string, string) stringAutoIncrementColumnfunc() (string, string)BoolLiteralfunc(bool) stringBuildProcedureCallfunc(string, int) stringBuildRoutineQueryfunc(string, int) stringColumnTypefunc(quarkdriver.ColumnSpec) stringCreateIndexIfNotExistsfunc(string, string, []string, bool) stringCreateTableIfNotExistsfunc(string, string) stringCurrentTimestampfunc() stringDropCheckfunc(string, string) stringDropForeignKeyfunc(string, string) stringDropIndexfunc(string, string) stringIntrospectSchemafunc(context.Context, Executor) (Schema, error)IsAlreadyExistsfunc(quarkdriver.SchemaObject, error) boolJSONExtractfunc(string, string) (string, []any, error)LastInsertIDQueryfunc(string, string) stringLimitOffsetfunc(int, int) stringLockSuffixfunc(LockOptions) (string, string, error)Placeholderfunc(int) stringPlaceholdersfunc(int) []stringQuotefunc(string) stringReferentialActionfunc(quarkdriver.ReferentialEvent, string) quarkdriver.ActionSupportReleaseSavepointStmtfunc(string) stringRenameColumnfunc(string, string, string) stringRenameTablefunc(string, string) stringReturningfunc(...string) stringRollbackToSavepointStmtfunc(string) stringSavepointStmtfunc(string) stringSupportsLastInsertIDfunc() boolSupportsReturningfunc() boolSupportsTransactionalDDLfunc() boolUpsertSQLfunc([]string, []string, int) string
MariaDBDialectstruct{MySQLDialect}AcquireMigrationLockfunc(context.Context, DBConnector, string, time.Duration) (MigrationLock, error)AlterTableAlterColumnfunc(string, string, string) stringAutoIncrementColumnfunc() (string, string)BoolLiteralfunc(bool) stringColumnTypefunc(quarkdriver.ColumnSpec) stringCreateSequencefunc(string, int64, int64) stringCreateSystemVersionedTablefunc(string, string) stringDropCheckfunc(string, string) stringHistoryBetweenfunc(string, string, string) stringHistoryQueryfunc(string) stringIntrospectSchemafunc(context.Context, Executor) (Schema, error)JSONExtractfunc(string, string) (string, []any, error)JSONTablefunc(string, string, ...string) stringLastInsertIDQueryfunc(string, string) stringLimitOffsetfunc(int, int) stringLockSuffixfunc(LockOptions) (string, string, error)NextValfunc(string) stringRenameColumnfunc(string, string, string) stringReturningfunc(...string) stringSupportsLastInsertIDfunc() boolSupportsReturningfunc() boolSupportsTransactionalDDLfunc() boolUpsertSQLfunc([]string, []string, int) string
MiddlewareinterfaceWrapExecfunc(ExecFunc) ExecFuncWrapQueryfunc(QueryFunc) QueryFuncWrapQueryRowfunc(QueryRowFunc) QueryRowFunc
MigrationLock=quarkdriver.MigrationLock(alias)MigrationLocker=quarkdriver.MigrationLocker(alias)ModelFieldstruct{Name string; Column string; GoType string; IsPK bool}ModelMeta=schema.ModelMeta(alias)MySQLDialectstruct{}AcquireMigrationLockfunc(context.Context, DBConnector, string, time.Duration) (MigrationLock, error)AlterColumnfunc(context.Context, quarkdriver.Executor, quarkdriver.ColumnChange) ([]string, error)AlterTableAddColumnfunc(string, string, string) stringAlterTableAlterColumnfunc(string, string, string) stringAlterTableDropColumnfunc(string, string) stringAutoIncrementColumnfunc() (string, string)BoolLiteralfunc(bool) stringBuildProcedureCallfunc(string, int) stringBuildRoutineQueryfunc(string, int) stringColumnTypefunc(quarkdriver.ColumnSpec) stringCreateIndexIfNotExistsfunc(string, string, []string, bool) stringCreateTableIfNotExistsfunc(string, string) stringCurrentTimestampfunc() stringDropCheckfunc(string, string) stringDropForeignKeyfunc(string, string) stringDropIndexfunc(string, string) stringIntrospectSchemafunc(context.Context, Executor) (Schema, error)IsAlreadyExistsfunc(quarkdriver.SchemaObject, error) boolJSONExtractfunc(string, string) (string, []any, error)LastInsertIDQueryfunc(string, string) stringLimitOffsetfunc(int, int) stringLockSuffixfunc(LockOptions) (string, string, error)Placeholderfunc(int) stringPlaceholdersfunc(int) []stringQuotefunc(string) stringRenameColumnfunc(string, string, string) stringRenameTablefunc(string, string) stringReturningfunc(...string) stringSupportsLastInsertIDfunc() boolSupportsReturningfunc() boolSupportsTransactionalDDLfunc() boolUpsertSQLfunc([]string, []string, int) string
Nullable=sql.Null(alias)OTelEventBusstruct{}Publishfunc(context.Context, Event) error
OpAddCheckstruct{Table string; Check Check}Stringfunc() string
OpAddColumnstruct{Table string; Column Column}Stringfunc() string
OpAddForeignKeystruct{Table string; ForeignKey ForeignKey}Stringfunc() string
OpAlterColumnstruct{Table string; Old Column; New Column}Stringfunc() string
OpCreateIndexstruct{Table string; Index Index}Stringfunc() string
OpCreateTablestruct{Table Table}Stringfunc() string
OpDropCheckstruct{Table string; Check string}Stringfunc() string
OpDropColumnstruct{Table string; Column string}Stringfunc() string
OpDropForeignKeystruct{Table string; ForeignKey string}Stringfunc() string
OpDropIndexstruct{Table string; Index string}Stringfunc() string
OpDropTablestruct{Table string}Stringfunc() string
Operationinterface (sealed)Stringfunc() string
Optionfunc(*Client)OracleDialectstruct{}AcquireMigrationLockfunc(context.Context, DBConnector, string, time.Duration) (MigrationLock, error)AlterColumnfunc(context.Context, quarkdriver.Executor, quarkdriver.ColumnChange) ([]string, error)AlterTableAddColumnfunc(string, string, string) stringAlterTableAlterColumnfunc(string, string, string) stringAlterTableDropColumnfunc(string, string) stringAutoIncrementColumnfunc() (string, string)BoolLiteralfunc(bool) stringBuildProcedureCallfunc(string, int) stringBuildRoutineQueryfunc(string, int) stringColumnTypefunc(quarkdriver.ColumnSpec) stringCreateIndexIfNotExistsfunc(string, string, []string, bool) stringCreateTableIfNotExistsfunc(string, string) stringCurrentTimestampfunc() stringIntrospectSchemafunc(context.Context, Executor) (Schema, error)IsAlreadyExistsfunc(quarkdriver.SchemaObject, error) boolJSONExtractfunc(string, string) (string, []any, error)LastInsertIDQueryfunc(string, string) stringLimitOffsetfunc(int, int) stringLockSuffixfunc(LockOptions) (string, string, error)MapColumnTypefunc(string) stringPlaceholderfunc(int) stringPlaceholdersfunc(int) []stringQuotefunc(string) stringReferentialActionfunc(quarkdriver.ReferentialEvent, string) quarkdriver.ActionSupportReleaseSavepointStmtfunc(string) stringRenameColumnfunc(string, string, string) stringRenameTablefunc(string, string) stringReturningfunc(...string) stringRollbackToSavepointStmtfunc(string) stringSavepointStmtfunc(string) stringSupportsLastInsertIDfunc() boolSupportsReturningfunc() boolSupportsTransactionalDDLfunc() boolUpsertSQLfunc([]string, []string, int) string
Page[T any] struct{Items []T; Total int64; Page int; PageSize int; TotalPages int64}Planstruct{Ops []Operation}Downfunc() (Plan, error)Hashfunc() stringIsEmptyfunc() boolStringfunc() string
PoolOptioninterface (sealed)PostgresDialectstruct{}AcquireMigrationLockfunc(context.Context, DBConnector, string, time.Duration) (MigrationLock, error)AlterColumnfunc(context.Context, quarkdriver.Executor, quarkdriver.ColumnChange) ([]string, error)AlterTableAddColumnfunc(string, string, string) stringAlterTableAlterColumnfunc(string, string, string) stringAlterTableDropColumnfunc(string, string) stringAutoIncrementColumnfunc() (string, string)BoolLiteralfunc(bool) stringBuildProcedureCallfunc(string, int) stringBuildRoutineQueryfunc(string, int) stringColumnTypefunc(quarkdriver.ColumnSpec) stringCurrentTimestampfunc() stringIntrospectSchemafunc(context.Context, Executor) (Schema, error)JSONExtractfunc(string, string) (string, []any, error)LastInsertIDQueryfunc(string, string) stringLimitOffsetfunc(int, int) stringLockSuffixfunc(LockOptions) (string, string, error)Placeholderfunc(int) stringPlaceholdersfunc(int) []stringQuotefunc(string) stringRenameColumnfunc(string, string, string) stringRenameTablefunc(string, string) stringReturningfunc(...string) stringSupportsLastInsertIDfunc() boolSupportsReturningfunc() boolSupportsTransactionalDDLfunc() boolUpsertSQLfunc([]string, []string, int) string
Predicatestruct{}Query[T any] struct{BaseQuery}AllowUnboundedfunc() *Query[T]Applyfunc(...Scope[T]) *Query[T]AsSubqueryfunc() (*Subquery, error)Avgfunc(string) (float64, error)Cachefunc(time.Duration, ...string) *Query[T]CheckVersionsfunc() *Query[T]Countfunc() (int64, error)Createfunc(*T) errorCreateBatchfunc([]*T) errorCrossJoinfunc(string) *Query[T]Cursorfunc() (*Cursor[T], error)Deletefunc(*T) (int64, error)DeleteBatchfunc([]any) (int64, error)DeleteByfunc() (int64, error)Distinctfunc() *Query[T]Exceptfunc(*Query[T]) *Query[T]ExceptAllfunc(*Query[T]) *Query[T]Findfunc(any) (T, error)Firstfunc() (T, error)ForSharefunc() *Query[T]ForUpdatefunc() *Query[T]FromCTEfunc(string) *Query[T]FromTablefunc(string) *Query[T]FullJoinfunc(string) *JoinBuilder[T]GroupByfunc(...string) *Query[T]HardDeletefunc(*T) (int64, error)Havingfunc(string, string, any) *Query[T]HavingAggregatefunc(string, string, string, any) *Query[T]HavingExprfunc(Expr) *Query[T]Intersectfunc(*Query[T]) *Query[T]IntersectAllfunc(*Query[T]) *Query[T]Iterfunc(func(T) error) errorJoinfunc(string) *JoinBuilder[T]LeftJoinfunc(string) *JoinBuilder[T]Limitfunc(int) *Query[T]Listfunc() ([]T, error)Maxfunc(string) (float64, error)Minfunc(string) (float64, error)MustAsSubqueryfunc() *SubqueryNoWaitfunc() *Query[T]Offsetfunc(int) *Query[T]OnlyTrashedfunc() *Query[T]Orfunc(func(*Query[T]) *Query[T]) *Query[T]OrderByfunc(string, string) *Query[T]Paginatefunc(int, int) (*Page[T], error)PaginateAfterfunc(int, string) (*KeysetPage[T], error)Preloadfunc(...string) *Query[T]PreloadWherefunc(string, string, string, any) *Query[T]Restorefunc(*T) (int64, error)RightJoinfunc(string) *JoinBuilder[T]Selectfunc(...string) *Query[T]SelectExprfunc(string, Expr) *Query[T]SkipLockedfunc() *Query[T]Sumfunc(string) (float64, error)Trackfunc() *TrackedQuery[T]Unionfunc(*Query[T]) *Query[T]UnionAllfunc(*Query[T]) *Query[T]Unscopedfunc() *Query[T]Updatefunc(*T) (int64, error)UpdateBatchfunc([]*T) errorUpdateFieldsfunc(*T, ...string) (int64, error)UpdateMapfunc(map[string]any) (int64, error)Upsertfunc(*T, []string, []string) errorUpsertBatchfunc([]*T, []string, []string) errorWherefunc(string, string, any) *Query[T]WhereBetweenfunc(string, any, any) *Query[T]WhereContainsfunc(string, string) *Query[T]WhereEndsWithfunc(string, string) *Query[T]WhereExprfunc(Expr) *Query[T]WhereInfunc(string, []any) *Query[T]WhereJSONfunc(string, string, string, any) *Query[T]WhereLikefunc(string, string) *Query[T]WhereNotfunc(string, string, any) *Query[T]WhereNotLikefunc(string, string) *Query[T]WherePfunc(...Predicate) *Query[T]WhereStartsWithfunc(string, string) *Query[T]WhereSubqueryfunc(string, string, string) *Query[T]Withfunc(string, *Subquery) *Query[T]WithRecursivefunc(string, *Subquery) *Query[T]WithTrashedfunc() *Query[T]WithoutAssociationsfunc() *Query[T]
QueryEventstruct{SQL string; Args []any; Duration time.Duration; Rows int64; Error error; Table string; Operation string; Kind StatementKind}QueryFuncfunc(context.Context, Executor, string, []any) (*sql.Rows, error)QueryObserverinterfaceObserveQueryfunc(QueryEvent)
QueryRowFuncfunc(context.Context, Executor, string, []any) *sql.RowRange[T any] struct{Lower T; Upper T; Bounds string; Empty bool}PGLiteralfunc() (string, error)Scanfunc(any) errorValuefunc() (driver.Value, error)
RelationMeta=schema.RelationMeta(alias)ReplicaStrategyintResult=quarkdriver.Result(alias)Routine[T any] struct{}Firstfunc() (T, error)Listfunc() ([]T, error)Scalarfunc() (T, error)
Row=quarkdriver.Row(alias)SQLGuard=guard.SQLGuard(alias)SQLiteDialectstruct{}AlterTableAddColumnfunc(string, string, string) stringAlterTableAlterColumnfunc(string, string, string) stringAlterTableDropColumnfunc(string, string) stringAutoIncrementColumnfunc() (string, string)BoolLiteralfunc(bool) stringBuildProcedureCallfunc(string, int) stringBuildRoutineQueryfunc(string, int) stringColumnTypefunc(quarkdriver.ColumnSpec) stringCurrentTimestampfunc() stringIntrospectSchemafunc(context.Context, Executor) (Schema, error)JSONExtractfunc(string, string) (string, []any, error)LastInsertIDQueryfunc(string, string) stringLimitOffsetfunc(int, int) stringLockSuffixfunc(LockOptions) (string, string, error)Placeholderfunc(int) stringPlaceholdersfunc(int) []stringQuotefunc(string) stringRebuildsTablesfunc() boolRenameColumnfunc(string, string, string) stringRenameTablefunc(string, string) stringReturningfunc(...string) stringSupportsLastInsertIDfunc() boolSupportsReturningfunc() boolSupportsTransactionalDDLfunc() boolUpsertSQLfunc([]string, []string, int) string
SavepointDialect=quarkdriver.SavepointDialect(alias)ScatterMerge[T any] struct{Less func(a T, b T) bool; Limit int}Schema=quarkdriver.Schema(alias)SchemaIntrospector=quarkdriver.SchemaIntrospector(alias)Scope[T any] func(*Query[T]) *Query[T]ShardFuncfunc(string) stringShardKeyerinterfaceShardKeyfunc() string
ShardResolverfunc(context.Context) stringShardRouterstruct{}GetClientfunc(context.Context) (*Client, error)ShardNamesfunc() []string
StatementKindstringStrictReadsModeintSubquerystruct{}SQLfunc() (string, []any)
SyncOptionsstruct{DryRun bool; NoTransaction bool}Table=quarkdriver.Table(alias)TableNamer=schema.TableNamer(alias)TenantConfigstruct{Strategy TenantStrategy; MaxCachedPools int; BaseClient *Client; TenantColumn string; SkipPolicyVerification bool; NativeRLSVar string}TenantRouterstruct{}ActiveTenantsfunc() []stringGetClientfunc(context.Context) (*Client, error)ResolveTenantfunc(context.Context) (string, error)Txfunc(context.Context, func(tx *Tx) error) error
TenantStrategyintTracked[T any] struct{Entity *T}Changedfunc() []stringSavefunc(context.Context) (int64, error)
TrackedQuery[T any] struct{}Findfunc(any) (*Tracked[T], error)Firstfunc() (*Tracked[T], error)Listfunc() ([]*Tracked[T], error)
Txstruct{}Commitfunc() errorOnCommitfunc(func(context.Context) error)OnRollbackfunc(func(context.Context) error)ReleaseSavepointfunc(string) errorRollbackfunc() errorRollbackTofunc(string) errorSavepointfunc(string) errorTxfunc(context.Context, func(tx *Tx) error) error
TypeMapper=migrate.TypeMapper(alias)TypeOptions=migrate.TypeOptions(alias)TypedBinderfunc(any, BindMode) ([]string, []any, error)TypedColumn[T any] struct{}Betweenfunc(T, T) PredicateEqfunc(T) PredicateGtfunc(T) PredicateGtefunc(T) PredicateInfunc(...T) PredicateIsNotNullfunc() PredicateIsNullfunc() PredicateLtfunc(T) PredicateLtefunc(T) PredicateNamefunc() stringNeqfunc(T) PredicateNotInfunc(...T) Predicate
TypedScannerfunc(*sql.Rows, any) errorTypedStringColumnstruct{TypedColumn[string]}Containsfunc(string) PredicateEndsWithfunc(string) PredicateLikefunc(string) PredicateLikeEscapedfunc(string) PredicateNotLikefunc(string) PredicateNotLikeEscapedfunc(string) PredicateStartsWithfunc(string) Predicate
ValidatorinterfaceValidatefunc(context.Context) error
Windowstruct{}OrderByfunc(Expr, bool) *WindowPartitionByfunc(...Expr) *WindowRangefunc(FrameBound, FrameBound) *WindowRowsfunc(FrameBound, FrameBound) *Window
Functions
Addfunc(Expr, Expr) ExprAndfunc(...Expr) ExprCallfunc(context.Context, ClientProvider, string, ...any) errorCanonicalTypefunc(string) stringCasefunc() *CaseBuilderCheckGeneratedDriftfunc(reflect.Type) (bool, bool)Cmpfunc(Expr, string, Expr) ExprColfunc(string) ExprContainsfunc(Expr, string) ExprCountDistinctfunc(Expr) ExprCumeDistfunc() ExprCurrentRowfunc() FrameBoundDefaultLimitsfunc() LimitsDefaultShardResolverfunc(context.Context) stringDefaultTenantConfigfunc() TenantConfigDeleteBatchOffunc[T any, V any](*Query[T], []V) (int64, error)DenseRankfunc() ExprDetectDialectfunc(string) (Dialect, error)DetectDialectByNamefunc(string) (Dialect, error)Difffunc(Schema, Schema) []OperationDividefunc(Expr, Expr) ExprEndsWithfunc(Expr, string) ExprEqfunc(Expr, Expr) ExprEscapeLikefunc(string) stringExistsfunc(*Subquery) ExprFirstValuefunc(Expr) ExprFollowingfunc(int) FrameBoundForfunc[T any](context.Context, ClientProvider) *Query[T]ForTxfunc[T any](context.Context, *Tx) *Query[T]Funcfunc(string, ...Expr) ExprGeneratedBinderRegisteredfunc(reflect.Type) boolGetModelMetafunc[T any]() *ModelMetaGetModelMetaByTypefunc(reflect.Type) *ModelMetaGtfunc(Expr, Expr) ExprGtefunc(Expr, Expr) ExprHashModelFieldsfunc([]ModelField) stringHashShardFuncfunc([]string) ShardFuncInfunc(Expr, ...Expr) ExprInSubfunc(Expr, *Subquery) ExprIsDeadlockfunc(error) boolIsUniqueViolationfunc(error) boolJSONExtractfunc(string, string) ExprLagfunc(Expr, int) ExprLastValuefunc(Expr) ExprLeadfunc(Expr, int) ExprLikefunc(Expr, string) ExprLitfunc(any) ExprLtfunc(Expr, Expr) ExprLtefunc(Expr, Expr) ExprMSSQLfunc() DialectMariaDBfunc() DialectModelHashfunc(reflect.Type) stringMultiplyfunc(Expr, Expr) ExprMySQLfunc() DialectNTilefunc(int) ExprNefunc(Expr, Expr) ExprNewfunc(string, string, ...any) (*Client, error)NewListenerFactoryfunc(*Client) *ListenerFactoryNewLoggerEventBusfunc(*slog.Logger) *LoggerEventBusNewOTelEventBusfunc(*slog.Logger) *OTelEventBusNewRoutinefunc[T any](context.Context, ClientProvider, string, ...any) *Routine[T]NewSQLGuardfunc() *SQLGuardNewShardRouterfunc(map[string]*Client, ShardResolver, ShardFunc) (*ShardRouter, error)NewTenantRouterfunc(TenantConfig, func(ctx context.Context) string, func(tenantID string) (*Client, error)) *TenantRouterNewTypedColumnfunc[T any](string) TypedColumn[T]NewTypedStringColumnfunc(string) TypedStringColumnNewWindowfunc() *WindowNewWithDBfunc(string, *sql.DB, ...any) (*Client, error)Notfunc(Expr) ExprNotExistsfunc(*Subquery) ExprNotInfunc(Expr, ...Expr) ExprNotInSubfunc(Expr, *Subquery) ExprNotLikefunc(Expr, string) ExprNotifyfunc(context.Context, ClientProvider, string, string) errorNthValuefunc(Expr, int) ExprNullOffunc[T any]() Nullable[T]Orfunc(...Expr) ExprOraclefunc() DialectOverfunc(Expr, *Window) ExprPercentRankfunc() ExprPostgreSQLfunc() DialectPrecedingfunc(int) FrameBoundRankfunc() ExprRegisterDialectfunc(string, Dialect)RegisterGeneratedMetafunc(reflect.Type, GeneratedMeta)RegisterTypeMapperfunc(reflect.Type, TypeMapper)RegisterTypedBinderfunc(reflect.Type, TypedBinder)RegisterTypedScannerfunc(reflect.Type, TypedScanner)RowNumberfunc() ExprSQLitefunc() DialectScanTargetfunc(any) anyScatterCountfunc[T any](context.Context, *ShardRouter, func(*Query[T]) *Query[T]) (int64, error)ScatterGatherfunc[T any](context.Context, *ShardRouter, func(*Query[T]) *Query[T], ScatterMerge[T]) ([]T, error)ShardKeyFromContextfunc(context.Context) stringSomeOffunc[T any](T) Nullable[T]StartsWithfunc(Expr, string) ExprStatementKindFromContextfunc(context.Context) StatementKindStickyfunc(context.Context) context.ContextStubBinderfunc(any, BindMode) ([]string, []any, error)StubScannerfunc(*sql.Rows, any) errorSubfunc(*Subquery) ExprSubtractfunc(Expr, Expr) ExprTrackReadsfunc(context.Context) context.ContextTxFromContextfunc(context.Context) *TxUnboundedFollowingfunc() FrameBoundUnboundedPrecedingfunc() FrameBoundWhereInOffunc[T any, V any](*Query[T], string, []V) *Query[T]WithCacheCrossInstancefunc() OptionWithCacheJitterfunc(float64) OptionWithCacheStorefunc(CacheStore) OptionWithCacheXFetchBetafunc(float64) OptionWithConnMaxIdleTimefunc(time.Duration) PoolOptionWithConnMaxLifetimefunc(time.Duration) PoolOptionWithDeadlockRetryfunc(int) OptionWithDefaultTZfunc(*time.Location) OptionWithDialectfunc(Dialect) OptionWithLimitsfunc(Limits) OptionWithLoggerfunc(*slog.Logger) OptionWithMaxIdleConnsfunc(int) PoolOptionWithMaxOpenConnsfunc(int) PoolOptionWithMiddlewarefunc(Middleware) OptionWithQueryObserverfunc(QueryObserver) OptionWithReplicaDownCooldownfunc(time.Duration) OptionWithReplicaStrategyfunc(ReplicaStrategy) OptionWithReplicasfunc(...string) OptionWithShardKeyfunc(context.Context, string) context.ContextWithShardKeyOffunc(context.Context, ShardKeyer) context.ContextWithSlowQueryThresholdfunc(time.Duration) OptionWithStatementCachefunc(int) OptionWithStrictColumnsfunc() OptionWithStrictReadsfunc(StrictReadsMode) Option
Constants
BindInsertBindModeBindUpdateBindModeDatabasePerTenantTenantStrategyGenContractVersionuntyped intLockForSharequarkdriver.LockModeLockForUpdatequarkdriver.LockModeLockNonequarkdriver.LockModeReplicaLeastConnReplicaStrategyReplicaRandomReplicaStrategyReplicaRoundRobinReplicaStrategyRowLevelSecurityTenantStrategyRowLevelSecurityClientTenantStrategyRowLevelSecurityNativeTenantStrategySchemaPerTenantTenantStrategyStatementDDLStatementKindStatementExecStatementKindStatementIntrospectionStatementKindStatementQueryStatementKindStatementRawStatementKindStatementSavepointStatementKindStrictReadsOffStrictReadsModeStrictReadsRejectStrictReadsModeStrictReadsWarnStrictReadsMode
Variables
ErrConnectionerrorErrConstraintViolationerrorErrDialectNotSupportederrorErrEventEmitFailederrorErrGeneratedStuberrorErrInvalidIdentifiererrorErrInvalidJSONPatherrorErrInvalidJoinerrorErrInvalidModelerrorErrInvalidQueryerrorErrInvalidTagerrorErrInvalidTimezoneerrorErrIrreversibleOperationerrorErrListenerClosederrorErrLockTimeouterrorErrNoSubscriptionerrorErrNotFounderrorErrRLSNotEnforcederrorErrStaleEntityerrorErrTenantMismatcherrorErrTimeouterrorErrUnsupportedFeatureerrorHasPlaceholdersfunc(query string) bool
cache/memory
github.com/jcsvwinston/quark/cache/memory · 8 symbols · pkg.go.dev
Types
Storestruct{}AcquireLockfunc(context.Context, string, time.Duration) (bool, func() error, error)Closefunc()Deletefunc(context.Context, string) errorGetfunc(context.Context, string) ([]byte, error)InvalidateTagsfunc(context.Context, ...string) errorSetfunc(context.Context, string, []byte, time.Duration, ...string) error
Functions
Newfunc() *Store
cache/redis
github.com/jcsvwinston/quark/cache/redis · 9 symbols · pkg.go.dev
Types
Optionsstruct{Addr string; Password string; DB int}Storestruct{}AcquireLockfunc(context.Context, string, time.Duration) (bool, func() error, error)Deletefunc(context.Context, string) errorGetfunc(context.Context, string) ([]byte, error)InvalidateTagsfunc(context.Context, ...string) errorPingfunc(context.Context) errorSetfunc(context.Context, string, []byte, time.Duration, ...string) error
Functions
Newfunc(Options) *Store
migrate
github.com/jcsvwinston/quark/migrate · 17 symbols · pkg.go.dev
Types
Migrationstruct{ID string; Name string; Message string; Up func(ctx context.Context, client *quark.Client) error; Down func(ctx context.Context, client *quark.Client) error; UpTx func(ctx context.Context, tx *sql.Tx) error; DownTx func(ctx context.Context, tx *sql.Tx) error}Migratorstruct{}Downfunc(context.Context, int) errorGetAppliedfunc(context.Context) (map[string]bool, error)Initfunc(context.Context) errorUpfunc(context.Context, int) errorUpDryRunfunc(context.Context, int) error
MigratorOptionfunc(*Migrator)
Functions
NewMigratorfunc(*quark.Client, ...MigratorOption) *MigratorRegisterfunc(*Migration)RegisteredCountfunc() intRegisteredIDsfunc() []stringResetfunc()WithLockNamefunc(string) MigratorOptionWithLockTimeoutfunc(time.Duration) MigratorOptionWithLoggerfunc(*slog.Logger) MigratorOptionWithoutLockfunc() MigratorOption
otel
github.com/jcsvwinston/quark/otel · 12 symbols · pkg.go.dev
Types
Middlewarestruct{quark.BaseMiddleware}WrapExecfunc(quark.ExecFunc) quark.ExecFuncWrapQueryfunc(quark.QueryFunc) quark.QueryFuncWrapQueryRowfunc(quark.QueryRowFunc) quark.QueryRowFunc
Optionfunc(*Middleware)RedactionModeint
Functions
Newfunc(...Option) *MiddlewareWithDBSystemfunc(string) OptionWithSpanRedactionfunc(RedactionMode) Option
Constants
IncludeArgsRedactionModeRedactArgsRedactionModeStatementKindKeyuntyped string
quarkdriver
github.com/jcsvwinston/quark/quarkdriver · 146 symbols · pkg.go.dev
Types
ActionSupportintAutoIncrementerinterfaceAutoIncrementColumnfunc() (string, string)
Checkstruct{Name string; Expression string}Classifierstruct{UniqueViolation func(error) bool; Deadlock func(error) bool; TransientConn func(error) bool}Columnstruct{Name string; Type string; Nullable bool; Default *string; PrimaryKey bool}ColumnAltererinterfaceAlterColumnfunc(context.Context, Executor, ColumnChange) ([]string, error)
ColumnChangestruct{Table string; Column string; Type string; Nullable bool; Default *string; PrimaryKey bool; TypeChanged bool; NullableChanged bool; DefaultChanged bool; PrimaryKeyChanged bool; HadDefault bool}ColumnKindintStringfunc() string
ColumnSpecstruct{Kind ColumnKind; Elem ColumnKind; Size int; Precision int; Scale int}ColumnTypeMapperinterfaceMapColumnTypefunc(string) string
ColumnTyperinterfaceBoolLiteralfunc(bool) stringColumnTypefunc(ColumnSpec) string
DBConninterfaceClosefunc() errorExecContextfunc(context.Context, string, ...any) (Result, error)QueryRowContextfunc(context.Context, string, ...any) Row
DBConnectorinterfaceConnfunc(context.Context) (DBConn, error)
DialectinterfaceAlterTableAddColumnfunc(string, string, string) stringAlterTableAlterColumnfunc(string, string, string) stringAlterTableDropColumnfunc(string, string) stringBuildProcedureCallfunc(string, int) stringBuildRoutineQueryfunc(string, int) stringCurrentTimestampfunc() stringJSONExtractfunc(string, string) (string, []any, error)LastInsertIDQueryfunc(string, string) stringLimitOffsetfunc(int, int) stringLockSuffixfunc(LockOptions) (string, string, error)Namefunc() stringPlaceholderfunc(int) stringPlaceholdersfunc(int) []stringQuotefunc(string) stringRenameColumnfunc(string, string, string) stringRenameTablefunc(string, string) stringReturningfunc(...string) stringSupportsLastInsertIDfunc() boolSupportsReturningfunc() boolSupportsTransactionalDDLfunc() boolUpsertSQLfunc([]string, []string, int) string
EventPayloadstruct{Channel string; Payload string}ExecutorinterfaceExecContextfunc(context.Context, string, ...any) (sql.Result, error)QueryContextfunc(context.Context, string, ...any) (*sql.Rows, error)QueryRowContextfunc(context.Context, string, ...any) *sql.Row
ForeignKeystruct{Name string; Columns []string; RefTable string; RefColumns []string; OnDelete string; OnUpdate string}IdempotentDDLinterfaceCreateIndexIfNotExistsfunc(string, string, []string, bool) stringCreateTableIfNotExistsfunc(string, string) stringIsAlreadyExistsfunc(SchemaObject, error) bool
IdentifierValidatorinterfaceValidateIdentifierfunc(string) error
Indexstruct{Name string; Columns []string; Unique bool}Knownstruct{Name string; Module string}ListenerinterfaceClosefunc() errorListenfunc(context.Context, string) errorReceivefunc(context.Context) (EventPayload, error)Unlistenfunc(context.Context, string) error
ListenerFactoryfunc(*sql.DB, IdentifierValidator) (Listener, error)LockModeintLockOptionsstruct{Mode LockMode; SkipLocked bool; NoWait bool}IsZerofunc() bool
MigrationLockinterfaceReleasefunc(context.Context) error
MigrationLockerinterfaceAcquireMigrationLockfunc(context.Context, DBConnector, string, time.Duration) (MigrationLock, error)
NewListenerFuncfunc(*sql.DB, *internal/guard.SQLGuard) (Listener, error)ObjectDropperinterfaceDropCheckfunc(string, string) stringDropForeignKeyfunc(string, string) stringDropIndexfunc(string, string) string
ReferentialActionerinterfaceReferentialActionfunc(ReferentialEvent, string) ActionSupport
ReferentialEventintStringfunc() string
ResultinterfaceLastInsertIdfunc() (int64, error)RowsAffectedfunc() (int64, error)
RowinterfaceScanfunc(...any) error
SQLStaterinterfaceSQLStatefunc() string
SavepointDialectinterfaceReleaseSavepointStmtfunc(string) stringRollbackToSavepointStmtfunc(string) stringSavepointStmtfunc(string) string
Schemastruct{Tables []Table}SchemaIntrospectorinterfaceIntrospectSchemafunc(context.Context, Executor) (Schema, error)
SchemaObjectintTablestruct{Name string; Columns []Column; Indexes []Index; ForeignKeys []ForeignKey; Checks []Check}TableRebuilderinterfaceRebuildsTablesfunc() bool
Functions
Classifiersfunc() []ClassifierHasEnginefunc(string) boolIsRegisteredfunc(string) boolLookupDialectfunc(string) (Dialect, bool)LookupListenerfunc(string) (NewListenerFunc, bool)LookupListenerFactoryfunc(string) (ListenerFactory, bool)MissingDriverHintfunc(string) stringMustRegisterfunc(string, Classifier)MustRegisterListenerfunc(string, NewListenerFunc)MustRegisterListenerFactoryfunc(string, ListenerFactory)Registerfunc(string, Classifier) errorRegisterDialectfunc(string, Dialect)RegisterListenerfunc(string, NewListenerFunc) errorRegisterListenerFactoryfunc(string, ListenerFactory) errorRegisteredEnginesfunc() []string
Constants
ActionImpliedActionSupportActionUnsupportedActionSupportActionWrittenActionSupportKindArrayColumnKindKindBoolColumnKindKindBytesColumnKindKindDecimalColumnKindKindFloat32ColumnKindKindFloat64ColumnKindKindIPColumnKindKindInt16ColumnKindKindInt32ColumnKindKindInt64ColumnKindKindJSONColumnKindKindOtherColumnKindKindRangeColumnKindKindStringColumnKindKindTextColumnKindKindTimeColumnKindKindUUIDColumnKindLockForShareLockModeLockForUpdateLockModeLockNoneLockModeObjectConstraintSchemaObjectObjectIndexSchemaObjectObjectTableSchemaObjectOnDeleteReferentialEventOnUpdateReferentialEvent
Variables
ErrListenerClosederrorErrLockTimeouterrorErrNoSubscriptionerrorErrUnsupportedFeatureerror
quarkdriver/drivertest
github.com/jcsvwinston/quark/quarkdriver/drivertest · 5 symbols · pkg.go.dev
Types
Casestruct{Engine string; Classifier quarkdriver.Classifier; Unique error; Deadlock error; Neither []error}DialectCasestruct{Dialect quarkdriver.Dialect; DB *sql.DB; DriverName string; Routines *Routines}Routinesstruct{Function string; Procedure string}
Functions
Verifyfunc(*testing.T, Case)VerifyDialectfunc(*testing.T, DialectCase)
quarkdriver/drivertest/suite
github.com/jcsvwinston/quark/quarkdriver/drivertest/suite · 1 symbols · pkg.go.dev
Functions
Runfunc(*testing.T, *quark.Client)
quarkmigrate
github.com/jcsvwinston/quark/quarkmigrate · 10 symbols · pkg.go.dev
Types
Actionstring
Functions
ParseActionfunc(string) (Action, error)Runfunc(context.Context, Action, *quark.Client, ...any) intRunWithOutputfunc(context.Context, Action, *quark.Client, io.Writer, io.Writer, ...any) int
Constants
ActionApplyActionActionPlanActionActionVerifyActionExitDriftDetecteduntyped intExitErroruntyped intExitSuccessuntyped int
quarktenant
github.com/jcsvwinston/quark/quarktenant · 18 symbols · pkg.go.dev
Types
ActionstringInstallOptionsstruct{TenantColumn string; NativeRLSVar string; ForceRLS bool; DryRun bool; LockTimeout time.Duration; LockName string; TenantColumnSQLCast string}VerifyFindingstruct{Table string; TableExists bool; RowSecurityEnabled bool; ForceRowSecurity bool; PolicyPresent bool; PolicyName string; PolicyCommand string; PredicateGap string}
Functions
DefaultInstallOptionsfunc() InstallOptionsInstallRLSPoliciesfunc(context.Context, *quark.Client, InstallOptions) ([]string, error)ParseActionfunc(string) (Action, error)Runfunc(context.Context, []string, *quark.Client) intRunWithIOfunc(context.Context, []string, *quark.Client, io.Writer, io.Writer) intVerifyRLSPoliciesfunc(context.Context, *quark.Client, InstallOptions) ([]VerifyFinding, error)
Constants
ActionInstallRLSPoliciesActionActionVerifyRLSPoliciesActionExitErroruntyped intExitNotEnforceduntyped intExitSuccessuntyped int
Variables
ErrInvalidCasterrorErrNoRegisteredModelserrorErrNoTenantColumnerrorErrRLSNotEnforcederror
quarktest
github.com/jcsvwinston/quark/quarktest · 3 symbols · pkg.go.dev
Functions
Migratefunc(testing.TB, *quark.Client, ...any)SQLitefunc(testing.TB, ...any) *quark.ClientTxfunc(testing.TB, *quark.Client, func(tx *quark.Tx))
seed
github.com/jcsvwinston/quark/seed · 6 symbols · pkg.go.dev
Types
Funcfunc(context.Context, *quark.Client) error
Functions
Countfunc() intGetfunc(string) (Func, bool)Namesfunc() []stringRegisterfunc(string, Func)Resetfunc()