Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DBTypes = createBaseTree()
View Source
var RequestTypes = []RequestType{ Create, Read, Update, Delete, }
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities string
const ( SupportsJSON Capabilities = "json" SupportsJSONB Capabilities = "jsonb" IsFile Capabilities = "file" SupportsSQLLike Capabilities = "sql" SupportsBSON Capabilities = "json" )
type DBTypeNode ¶
type DBTypeNode struct {
Name string
TrueName string
Properties map[string]string
Children []*DBTypeNode
}
func (*DBTypeNode) Register ¶
func (n *DBTypeNode) Register(path ...string)
type DataSourceNameRequest ¶
type DataSourceNameRequest interface {
DataSourceNamer
Request
}
type DataSourceNamer ¶
type NoSQL ¶
type NoSQL interface {
Database
Client() NoSQLClient
}
type NoSQLClient ¶
type NoSQLClient interface {
SetConnectionProperties(map[string]string) // FIXME: Temporary map for connection things
Open(context.Context) error
Ping(context.Context) error
Close(context.Context) error
// TODO: Translate a request to a NoSQL client method chain
Read(any)
ReadMany(any)
Create(any)
Update(any)
Delete(any)
}
type NoSQLModelType ¶
type NoSQLModelType int
const ( MongoDB NoSQLModelType = iota // mongo Firestore // firestore Redis // redis NumSupportedNoSQLModels )
func (NoSQLModelType) BaseType ¶
func (t NoSQLModelType) BaseType() Type
func (NoSQLModelType) String ¶
func (i NoSQLModelType) String() string
type RequestType ¶
type RequestType int
const ( NoOp RequestType = iota - 1 Create Read Update Delete )
type SQL ¶
type SQL interface {
Database
Dialect() SQLDialect
}
type SQLDialect ¶
type SQLDialect interface {
Name() string
ConnectionStringTemplate() *template.Template
GetTemplate(RequestType) string
GetPrefab(Request) (string, []any, error)
Capabilities() []Capabilities
RenderPlaceholder(index int) string
IncreamentPlaceholder() string
RenderTypeCast() string
RenderCurrentTimestamp() string
RenderValue(any) string
QuoteRune() rune
Quote(string) string
ResolveType(string, []byte) (any, error)
}
type SQLDialectType ¶
type SQLDialectType int
const ( PostgreSQL SQLDialectType = iota // postgres MySQL // mysql SQLite3 // sqlite3 NumSupportedSQLDialects )
func (SQLDialectType) BaseType ¶
func (t SQLDialectType) BaseType() Type
func (SQLDialectType) String ¶
func (i SQLDialectType) String() string
type TimeSeriesType ¶
type TimeSeriesType int
const (
NumSupportedTimeSeries TimeSeriesType = iota
)
func (TimeSeriesType) BaseType ¶
func (t TimeSeriesType) BaseType() Type
func (TimeSeriesType) String ¶
func (i TimeSeriesType) String() string
Click to show internal directories.
Click to hide internal directories.