-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuilder.go
More file actions
33 lines (25 loc) · 818 Bytes
/
builder.go
File metadata and controls
33 lines (25 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package sql
import (
"github.com/go-rel/rel"
)
type QueryBuilder interface {
Build(query rel.Query) (string, []any)
}
type InsertBuilder interface {
Build(table string, primaryField string, mutates map[string]rel.Mutate, onConflict rel.OnConflict) (string, []any)
}
type InsertAllBuilder interface {
Build(table string, primaryField string, fields []string, bulkMutates []map[string]rel.Mutate, onConflict rel.OnConflict) (string, []any)
}
type UpdateBuilder interface {
Build(table string, primaryField string, mutates map[string]rel.Mutate, filter rel.FilterQuery) (string, []any)
}
type DeleteBuilder interface {
Build(table string, filter rel.FilterQuery) (string, []any)
}
type TableBuilder interface {
Build(table rel.Table) string
}
type IndexBuilder interface {
Build(index rel.Index) string
}