github.com/reggieriser/pop@v4.13.1+incompatible/dialect.go (about) 1 package pop 2 3 import ( 4 "io" 5 6 "github.com/gobuffalo/fizz" 7 "github.com/gobuffalo/pop/columns" 8 ) 9 10 type crudable interface { 11 SelectOne(store, *Model, Query) error 12 SelectMany(store, *Model, Query) error 13 Create(store, *Model, columns.Columns) error 14 Update(store, *Model, columns.Columns) error 15 Destroy(store, *Model) error 16 } 17 18 type fizzable interface { 19 FizzTranslator() fizz.Translator 20 } 21 22 type quotable interface { 23 Quote(key string) string 24 } 25 26 type dialect interface { 27 crudable 28 fizzable 29 quotable 30 Name() string 31 URL() string 32 MigrationURL() string 33 Details() *ConnectionDetails 34 TranslateSQL(string) string 35 CreateDB() error 36 DropDB() error 37 DumpSchema(io.Writer) error 38 LoadSchema(io.Reader) error 39 Lock(func() error) error 40 TruncateAll(*Connection) error 41 } 42 43 type afterOpenable interface { 44 AfterOpen(*Connection) error 45 }