DDLDialect defines how to generate DDL for a specific database
| 9 | |
| 10 | // DDLDialect defines how to generate DDL for a specific database |
| 11 | type DDLDialect interface { |
| 12 | Name() string |
| 13 | QuoteIdentifier(s string) string |
| 14 | MapType(graphqlType string, notNull bool, primaryKey bool) string |
| 15 | MapDefault(defaultVal string) string |
| 16 | CreateTable(table sdata.DBTable) string |
| 17 | AddColumn(tableName string, col sdata.DBColumn) string |
| 18 | DropColumn(tableName, colName string) string |
| 19 | DropTable(tableName string) string |
| 20 | AddForeignKey(tableName string, col sdata.DBColumn) string |
| 21 | CreateSearchIndex(tableName string, col sdata.DBColumn) string |
| 22 | CreateUniqueIndex(tableName string, col sdata.DBColumn) string |
| 23 | CreateIndex(tableName string, col sdata.DBColumn) string |
| 24 | AlterClusteringKey(tableName string, keys []string) string |
| 25 | } |
| 26 | |
| 27 | // SupportsSchemaDDL reports whether GraphJin supports live schema DDL sync for dbType. |
| 28 | func SupportsSchemaDDL(dbType string) bool { |
no outgoing calls
no test coverage detected