otter-space-sdk/pkg/database/database.go
SoXX 470681fd4f
All checks were successful
Gitea Build Check / Build (push) Successful in 2m31s
Gitea Build Check / Build (pull_request) Successful in 2m26s
feat: custom query's
added the ability to execute custom query's
2024-07-27 19:41:41 +02:00

35 lines
865 B
Go

package database
import (
"context"
"database/sql"
"git.anthrove.art/Anthrove/otter-space-sdk/v2/pkg/models"
)
type OtterSpace interface {
// Connect establishes a connection to the database.
Connect(ctx context.Context, config models.DatabaseConfig) error
// Post contains all function that are needed to manage Posts
Post
// User contains all function that are needed to manage the AnthroveUser
User
// Source contains all function that are needed to manage the Source
Source
// Tag contains all functions that are used to manage Tag
Tag
// TagAlias contains all function that are needed to manage the TagAlias
TagAlias
// TagGroup contains all function that are needed to manage the TagGroup
TagGroup
// ExecuteRawStatement run a custom query.
ExecuteRawStatement(ctx context.Context, query string, args ...any) (*sql.Rows, error)
}