Documentation ¶
Index ¶
- func ArgsToParams(args []interface{}) map[string]interface{}
- func Delete[K Keys](db BufferWriter, t Table, keys ...K) error
- func DeleteByBuilder(ctx context.Context, db Updater, b squirrel.DeleteBuilder) (int64, error)
- func DeleteCircle(_ context.Context, db BufferWriter, circle repo.CircleKey) error
- func DeleteSearch(_ context.Context, db BufferWriter, in repo.SearchKey) error
- func ExistsKey[K Key](ctx context.Context, db RowReader, t Table, k K) (bool, error)
- func ExistsUser(ctx context.Context, db RowReader, key repo.UserKey) (bool, error)
- func GetByKey[M any, K Key](ctx context.Context, db RowReader, t Table, k K) (m M, err error)
- func GetByKeys[M any, K Keys](ctx context.Context, db Reader, t Table, ids ...K) ([]M, error)
- func GetCircle(ctx context.Context, db RowReader, key repo.CircleKey) (repo.Circle, error)
- func GetPostClassificationTags(ctx context.Context, db Reader, postID string) ([]string, error)
- func GetPosts(ctx context.Context, db Reader, postIDs ...string) ([]repo.Post, error)
- func GetPtrResults[M any](iter *spanner.RowIterator) (out []*M, err error)
- func GetResult[M any](iter *spanner.RowIterator) (out M, err error)
- func GetResultByBuilder[M any](ctx context.Context, db Queryer, b squirrel.SelectBuilder) (m M, err error)
- func GetResults[M any](iter *spanner.RowIterator) (out []M, err error)
- func GetResultsByBuilder[M any](ctx context.Context, db Queryer, b squirrel.SelectBuilder) ([]M, error)
- func GetSearches(ctx context.Context, db Queryer, kind int64, userID string, c cursor.Cursor) ([]repo.Search, error)
- func GetUser(ctx context.Context, db RowReader, key repo.UserKey) (repo.User, error)
- func GetUserCircleEdge(ctx context.Context, db RowReader, key repo.UserCircleEdgeKey) (repo.UserCircleEdge, error)
- func GetUserUserEdge(ctx context.Context, db RowReader, key repo.UserUserEdgeKey) (repo.UserUserEdge, error)
- func InsertByBuilder(ctx context.Context, db Updater, b squirrel.InsertBuilder) (int64, error)
- func InsertPosts(_ context.Context, db BufferWriter, posts ...repo.Post) error
- func InsertUser(_ context.Context, db BufferWriter, input repo.InsertUserInput) error
- func InsertUserCircleEdge(_ context.Context, db BufferWriter, userCircleEdge repo.UserCircleEdge) error
- func InsertUserUserEdge(_ context.Context, db BufferWriter, edge repo.InsertUserUserEdgeInput) error
- func NewSpannerClient(ctx context.Context, dsn, adcCredPath string) (*spanner.Client, error)
- func PartialUpdateUser(_ context.Context, db BufferWriter, input repo.PartialUpdateUserInput) error
- func PartialUpdateUserCircleEdge(_ context.Context, db BufferWriter, ...) error
- func PartialUpdateUserUserEdge(_ context.Context, db BufferWriter, input repo.PartialUpdateUserUserEdgeInput) error
- func RemovePost(_ context.Context, db BufferWriter, postID string, deletedAt time.Time) error
- func UpdateByBuilder(ctx context.Context, db Updater, b squirrel.UpdateBuilder) (int64, error)
- func UpsertCircle(_ context.Context, db BufferWriter, circle repo.Circle) error
- func UpsertPostClassificationTags(_ context.Context, db BufferWriter, postID string, tags ...string) error
- func UpsertSearch(_ context.Context, db BufferWriter, in repo.SearchInput) error
- type BufferWriter
- type DBWriter
- type Index
- type IndexReader
- type Key
- type Keys
- type Queryer
- type ReadWriter
- type Reader
- type Repo
- func (r Repo) ReadOnlyTx(ctx context.Context, f func(context.Context, repo.ReadActions) error) error
- func (r Repo) ReadWriteTx(ctx context.Context, f func(context.Context, repo.ReadWriteActions) error) (time.Time, error)
- func (r Repo) SingleRead() repo.ReadActions
- func (r Repo) SingleWrite() repo.WriteActions
- type RowReader
- type Table
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgsToParams ¶
func ArgsToParams(args []interface{}) map[string]interface{}
func DeleteByBuilder ¶
func DeleteCircle ¶
func DeleteSearch ¶
func ExistsUser ¶
func GetPtrResults ¶
func GetPtrResults[M any](iter *spanner.RowIterator) (out []*M, err error)
GetPtrResults returns the results from the iterator. Calls Stop after the iterator is finished.
func GetResult ¶
func GetResult[M any](iter *spanner.RowIterator) (out M, err error)
GetResult returns the result from the iterator. Calls Stop after the iterator is finished.
func GetResultByBuilder ¶
func GetResults ¶
func GetResults[M any](iter *spanner.RowIterator) (out []M, err error)
GetResults returns the results from the iterator. Calls Stop after the iterator is finished.
func GetResultsByBuilder ¶
func GetSearches ¶
func GetUserCircleEdge ¶
func GetUserCircleEdge(ctx context.Context, db RowReader, key repo.UserCircleEdgeKey) (repo.UserCircleEdge, error)
func GetUserUserEdge ¶
func GetUserUserEdge( ctx context.Context, db RowReader, key repo.UserUserEdgeKey, ) (repo.UserUserEdge, error)
func InsertByBuilder ¶
func InsertPosts ¶
func InsertUser ¶
func InsertUser( _ context.Context, db BufferWriter, input repo.InsertUserInput, ) error
func InsertUserCircleEdge ¶
func InsertUserCircleEdge(_ context.Context, db BufferWriter, userCircleEdge repo.UserCircleEdge) error
func InsertUserUserEdge ¶
func InsertUserUserEdge(_ context.Context, db BufferWriter, edge repo.InsertUserUserEdgeInput) error
func NewSpannerClient ¶
func PartialUpdateUser ¶
func PartialUpdateUser( _ context.Context, db BufferWriter, input repo.PartialUpdateUserInput, ) error
func PartialUpdateUserCircleEdge ¶
func PartialUpdateUserCircleEdge( _ context.Context, db BufferWriter, input repo.PartialUpdateUserCircleEdgeInput, ) error
func PartialUpdateUserUserEdge ¶
func PartialUpdateUserUserEdge( _ context.Context, db BufferWriter, input repo.PartialUpdateUserUserEdgeInput, ) error
func RemovePost ¶
func UpdateByBuilder ¶
func UpsertCircle ¶
func UpsertSearch ¶
func UpsertSearch(_ context.Context, db BufferWriter, in repo.SearchInput) error
Types ¶
type BufferWriter ¶
type DBWriter ¶
type DBWriter interface { Updater BufferWriter }
type IndexReader ¶
type ReadWriter ¶
type ReadWriter interface { Reader BufferWriter }
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (Repo) ReadOnlyTx ¶
func (Repo) ReadWriteTx ¶
func (Repo) SingleRead ¶
func (r Repo) SingleRead() repo.ReadActions
func (Repo) SingleWrite ¶
func (r Repo) SingleWrite() repo.WriteActions
Source Files ¶
- create_user.go
- db_helper.go
- delete_circle.go
- delete_search.go
- exists_user.go
- get_circle.go
- get_post_classification_tags.go
- get_posts.go
- get_searches.go
- get_user.go
- get_user_circle_edge.go
- get_user_user_edge.go
- insert_posts.go
- insert_user_circle_edge.go
- insert_user_user_edge.go
- partial_update_user.go
- partial_update_user_circle_edge.go
- partial_update_user_user_edge.go
- remove_post.go
- repo.go
- tx_manager.go
- upsert_circle.go
- upsert_post_classification_tags.go
- upsert_search.go
Click to show internal directories.
Click to hide internal directories.