forked from rainycape/gondola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
capability.go
34 lines (32 loc) · 866 Bytes
/
capability.go
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
34
package driver
// Capability indicates the capabilities of an
// ORM driver.
type Capability int
const (
// No capabilities
CAP_NONE Capability = 0
// Can perform JOINs
CAP_JOIN = 1 << iota
// Can perform OR queries
CAP_OR
// Can create transactions
CAP_TRANSACTION
// Can begin/commit/rollback a transaction
CAP_BEGIN
// Can automatically assign ids to rows
CAP_AUTO_ID
// Automatically assigned ids increase sequentially
CAP_AUTO_INCREMENT
// Provides eventual consistency rather than strong consistency
CAP_EVENTUAL
// Supports having a primary key
CAP_PK
// Primary key can be formed from multiple fields
CAP_COMPOSITE_PK
// Can have non-PK unique fields, enforce by the backend.
CAP_UNIQUE
// Can have database level defaults.
CAP_DEFAULTS
// Can have database level defaults for TEXT fields (unbounded strings).
CAP_DEFAULTS_TEXT
)