type
Store
A SQLite implementation of Ridu’s document, snapshot, auth, preference, task, lock, version, and migration store contracts.
Implemented capabilities
| Property | Type | Description |
|---|---|---|
store.Store | document transactions | Begins atomic read-write operation transactions. |
store.SnapshotStore | stable snapshots | Begins stable read snapshots. |
store.HealthStore | connectivity | Checks SQLite connectivity and foreign-key enforcement. |
store.ReadinessStore | runtime readiness | Checks the exact applied manifest. |
store.MigrationReadinessStore | exact executable history | Checks the complete ordered ledger against the fingerprint embedded in the release binary. |
store.PreferenceStore | preferences | Persists per-user settings. |
store.DocumentLockStore | document locks | Coordinates authoring leases. |
store.AuthStore | authentication | Persists credentials, sessions, tokens, API keys, and rate limits. |
store.AuthMaintenanceStore | auth maintenance | Prunes expired auth records in bounded batches. |
store.AuthUnlockStore | account unlocks | Clears authorized lockout state. |
store.TaskStore | durable tasks | Persists and leases durable work. |
store.UploadObjectLocker | upload coordination | Coordinates upload object changes on one host. |
How it works
Use the application and Local API for content operations. SQLite is supported on a local filesystem and one application host; it is not a shared-network-filesystem or multi-host store.
Full signature
type Store struct {
// contains filtered or unexported fields
}Methods
Store.Close()Release every pooled SQLite connection.
Store.Ping()Check connectivity and foreign-key enforcement.
Store.Ready()Prove connectivity and an exact applied manifest.
Store.ReadyWithMigrationHistory()Prove ordinary readiness and exact agreement with executable migration history.
Store.Begin()Begin a write-capable transaction with an immediate writer reservation.
Store.BeginSnapshot()Begin a stable deferred read snapshot.
Store.Migrate()Install adapter-owned tables and record the manifest for development or bootstrap use.
Store.ApplyArtifacts()Validate and atomically apply all pending immutable artifacts.
Store.ArtifactPlan()Return manifest-bound pending and applied artifact topology.
Store.ArtifactStatus()Report immutable history against the SQLite ledger and executable manifest.
Store.DownArtifacts()Atomically reverse the latest applied artifact.
Store.ResetArtifacts()Atomically reverse all applied artifacts.
Store.RefreshArtifacts()Atomically reverse and replay committed history.
Store.FreshArtifacts()Drop non-internal objects and replay committed history atomically.
Store.AcquireDocumentLock()Public method Store.AcquireDocumentLock from github.com/riducms/ridu/adapters/sqlite.
Store.AllowAuthAttempt()Public method Store.AllowAuthAttempt from github.com/riducms/ridu/adapters/sqlite.
Store.CancelTask()Public method Store.CancelTask from github.com/riducms/ridu/adapters/sqlite.
Store.ChangePasswordHash()Public method Store.ChangePasswordHash from github.com/riducms/ridu/adapters/sqlite.
Store.ClaimTasks()Public method Store.ClaimTasks from github.com/riducms/ridu/adapters/sqlite.
Store.CompleteTask()Public method Store.CompleteTask from github.com/riducms/ridu/adapters/sqlite.
Store.CreateAPIKey()Public method Store.CreateAPIKey from github.com/riducms/ridu/adapters/sqlite.
Store.CreateAuthToken()Public method Store.CreateAuthToken from github.com/riducms/ridu/adapters/sqlite.
Store.CreateSession()Public method Store.CreateSession from github.com/riducms/ridu/adapters/sqlite.
Store.DeleteAPIKey()Public method Store.DeleteAPIKey from github.com/riducms/ridu/adapters/sqlite.
Store.DeletePreference()Public method Store.DeletePreference from github.com/riducms/ridu/adapters/sqlite.
Store.DeletePreferences()Public method Store.DeletePreferences from github.com/riducms/ridu/adapters/sqlite.
Store.DeleteSession()Public method Store.DeleteSession from github.com/riducms/ridu/adapters/sqlite.
Store.DeleteUserSession()Public method Store.DeleteUserSession from github.com/riducms/ridu/adapters/sqlite.
Store.DeleteUserSessions()Public method Store.DeleteUserSessions from github.com/riducms/ridu/adapters/sqlite.
Store.DismissTaskForTarget()Public method Store.DismissTaskForTarget from github.com/riducms/ridu/adapters/sqlite.
Store.EnqueueTask()Public method Store.EnqueueTask from github.com/riducms/ridu/adapters/sqlite.
Store.FailTask()Public method Store.FailTask from github.com/riducms/ridu/adapters/sqlite.
Store.FindAPIKey()Public method Store.FindAPIKey from github.com/riducms/ridu/adapters/sqlite.
Store.FindAuthCredential()Public method Store.FindAuthCredential from github.com/riducms/ridu/adapters/sqlite.
Store.FindDocumentLock()Public method Store.FindDocumentLock from github.com/riducms/ridu/adapters/sqlite.
Store.FindSession()Public method Store.FindSession from github.com/riducms/ridu/adapters/sqlite.
Store.FindTask()Public method Store.FindTask from github.com/riducms/ridu/adapters/sqlite.
Store.ForceUnlock()Public method Store.ForceUnlock from github.com/riducms/ridu/adapters/sqlite.
Store.GetPreference()Public method Store.GetPreference from github.com/riducms/ridu/adapters/sqlite.
Store.HeartbeatTask()Public method Store.HeartbeatTask from github.com/riducms/ridu/adapters/sqlite.
Store.ListAPIKeys()Public method Store.ListAPIKeys from github.com/riducms/ridu/adapters/sqlite.
Store.ListSessions()Public method Store.ListSessions from github.com/riducms/ridu/adapters/sqlite.
Store.ListTasks()Public method Store.ListTasks from github.com/riducms/ridu/adapters/sqlite.
Store.LockUploadObjects()LockUploadObjects serializes upload admission and cleanup across every process sharing a file database. SQLite memory databases are private to one Store and use the equivalent in-process gate.
Store.PruneExpiredAuth()PruneExpiredAuth removes at most limit records from each expiring auth family. BEGIN IMMEDIATE serializes candidates across processes so two maintenance workers cannot count or delete the same record.
Store.PruneTasks()Public method Store.PruneTasks from github.com/riducms/ridu/adapters/sqlite.
Store.RecordFailedLogin()Public method Store.RecordFailedLogin from github.com/riducms/ridu/adapters/sqlite.
Store.ReleaseDocumentLock()Public method Store.ReleaseDocumentLock from github.com/riducms/ridu/adapters/sqlite.
Store.ReleaseTask()Public method Store.ReleaseTask from github.com/riducms/ridu/adapters/sqlite.
Store.ResetLoginAttempts()Public method Store.ResetLoginAttempts from github.com/riducms/ridu/adapters/sqlite.
Store.ResetPasswordWithToken()Public method Store.ResetPasswordWithToken from github.com/riducms/ridu/adapters/sqlite.
Store.RotateSession()Public method Store.RotateSession from github.com/riducms/ridu/adapters/sqlite.
Store.SetPasswordHash()Public method Store.SetPasswordHash from github.com/riducms/ridu/adapters/sqlite.
Store.SetPreference()Public method Store.SetPreference from github.com/riducms/ridu/adapters/sqlite.
Store.TouchAPIKey()Public method Store.TouchAPIKey from github.com/riducms/ridu/adapters/sqlite.
Store.UpgradePasswordHash()Public method Store.UpgradePasswordHash from github.com/riducms/ridu/adapters/sqlite.
Store.VerifyEmailWithToken()Public method Store.VerifyEmailWithToken from github.com/riducms/ridu/adapters/sqlite.
Store.AdoptArtifacts()AdoptArtifacts records pending migrations as applied, without running them, through the newest one whose schema the database already has, such as a database ridu dev synchronized. See ridu migrate baseline.
Store.ClearDevelopmentFieldKinds()ClearDevelopmentFieldKinds clears only the confirmed changed fields, in working values, published heads, and snapshots, and adopts the resulting development schema in one transaction. Immutable migration history is never bypassed.
Store.DevelopmentManifest()DevelopmentManifest returns the schema recorded by the database's last development synchronization or migration. Generated files and disposable CLI caches cannot establish how persisted values should be interpreted.
Store.EnableDevelopmentVersions()EnableDevelopmentVersions turns the stored documents of each resource that starts keeping versions into versioned documents as existing says, and synchronizes the database to after in the same transaction, using the executor migrations use. It refuses a database with migration history, which only ridu migrate may change.
Store.FindSessionByID()Public method Store.FindSessionByID from github.com/riducms/ridu/adapters/sqlite.
Store.HasMigrationHistory()HasMigrationHistory reports whether ridu migrate manages this database.
Store.RenameDevelopmentFields()RenameDevelopmentFields moves content across reviewed field renames in a database that
ridu devsynchronizes, using the executor migrations use, and synchronizes the database to the resulting schema in the same transaction. The database then records that schema as the one it has, so a rename that was applied is never mistaken for one still waiting. It refuses a database with migration history, which only ridu migrate may change.Store.ReplaceBaseline()ReplaceBaseline replaces a verified development ledger with committed history whose physical schema is already present. It never runs migration data steps: replacement artifacts from the first unrecorded data or semantic step onward stay pending for ApplyArtifacts.
Store.ReviewDevelopmentFieldKinds()ReviewDevelopmentFieldKinds counts logical documents (including trash) across both active heads and every retained snapshot under their previous schema, without changing data.
Store.ReviewDevelopmentVersions()ReviewDevelopmentVersions counts the documents, trashed ones included, that each resource starting to keep versions between before and after already stores in this database. It changes nothing.