datastores

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLStore

type SQLStore struct {
	DB *sql.DB
}

SQLStore implements the RelationTupleStore interface for a sql storage adapter.

func (*SQLStore) ListRelationTuples

ListRelationTuples lists the relation tuples matching the request query and filters the response fields by the provided field mask.

func (*SQLStore) RowCount

func (s *SQLStore) RowCount(ctx context.Context, query ac.RelationTupleQuery) (int64, error)

RowCount returns the number of rows matching the relation tuple query provided.

func (*SQLStore) SubjectSets

func (s *SQLStore) SubjectSets(ctx context.Context, object ac.Object, relations ...string) ([]ac.SubjectSet, error)

SubjectSets fetches the subject sets for all of the (object, relation) pairs provided.

func (*SQLStore) TransactRelationTuples

func (s *SQLStore) TransactRelationTuples(ctx context.Context, tupleInserts []*ac.InternalRelationTuple, tupleDeletes []*ac.InternalRelationTuple) error

TransactRelationTuples applies, with the same txn, the relation tuple inserts and deletions provided. Each insertion/deletion includes a corresponding changelog entry with an operation indicating what was applied.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL