summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/schema/dialect.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-01-15 14:08:07 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-15 14:08:07 +0100
commit6433a505820cfeb43990a3453a0ed8b24e432b7d (patch)
tree3f968a63d6a77991df95fde88ee0f08727f26eb6 /vendor/github.com/uptrace/bun/schema/dialect.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.20.12 to 2.20.14 (#2530) (diff)
downloadgotosocial-6433a505820cfeb43990a3453a0ed8b24e432b7d.tar.xz
[chore] update bun + extras v1.1.16 -> v1.1.17 (#2534)
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/dialect.go')
-rw-r--r--vendor/github.com/uptrace/bun/schema/dialect.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/dialect.go b/vendor/github.com/uptrace/bun/schema/dialect.go
index fea8238dc..8814313f7 100644
--- a/vendor/github.com/uptrace/bun/schema/dialect.go
+++ b/vendor/github.com/uptrace/bun/schema/dialect.go
@@ -31,6 +31,10 @@ type Dialect interface {
AppendJSON(b, jsonb []byte) []byte
AppendBool(b []byte, v bool) []byte
+ // AppendSequence adds the appropriate instruction for the driver to create a sequence
+ // from which (autoincremented) values for the column will be generated.
+ AppendSequence(b []byte, t *Table, f *Field) []byte
+
// DefaultVarcharLen should be returned for dialects in which specifying VARCHAR length
// is mandatory in queries that modify the schema (CREATE TABLE / ADD COLUMN, etc).
// Dialects that do not have such requirement may return 0, which should be interpreted so by the caller.
@@ -177,3 +181,7 @@ func (d *nopDialect) IdentQuote() byte {
func (d *nopDialect) DefaultVarcharLen() int {
return 0
}
+
+func (d *nopDialect) AppendSequence(b []byte, _ *Table, _ *Field) []byte {
+ return b
+}