Documentation
¶
Index ¶
- Constants
- func SupportsTextSearch(d store.Dataset) bool
- type Store
- func (s *Store) Close()
- func (s *Store) DescribeFields(ctx context.Context, sc store.Scope) ([]store.Field, error)
- func (s *Store) GetAdmin() store.Reader
- func (s *Store) GetReader() store.Reader
- func (s *Store) GetWritter() store.Reader
- func (s *Store) PurgeTenant(ctx context.Context, tenantID string) error
- func (s *Store) Query(ctx context.Context, sql string) ([]json.RawMessage, error)
- func (s *Store) TableName(d store.Dataset) string
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func SupportsTextSearch ¶
Types ¶
type Store ¶
func (*Store) DescribeFields ¶
DescribeFields is the store's own, with a cache in front. Listing the fields of a dataset reads the JSON columns of the table to find the paths inside them, which on a big table takes longer than the callers wait, and the answer hardly changes. So it is computed once for everyone asking at the same moment, kept for ten minutes, and an old copy is served at once while a fresh one is worked out. A caller that stops waiting does not stop the work: the next one finds it done.
func (*Store) GetWritter ¶
func (*Store) PurgeTenant ¶
PurgeTenant deletes all rows scoped to the given tenant across every dataset table. ClickHouse mutation, not synchronous — the ALTER returns once accepted and the rows disappear as the mutation runs.
tenantID must be a UUID string (caller passes uuid.UUID.String()); it is inlined into the SQL because ClickHouse does not bind parameters inside ALTER ... DELETE mutation expressions. The UUID shape makes inlining safe.