Spec: add 'Struct' definition
Worth to add structs with some simple syntax like this:
Struct some_struct {
field_a integer
field_b text
}
Reason is PostgreSQL, Oracle DB, IBM DataStage, Ms SQL Server etc sql databases has custom struct type.
I think, that dbml was made not only for sqlite :smile:
// P.S. i'll try to add more info bit later
Thanks @ololosha228. This is a valid request and something we're keen to add. Will definitely look into this.
@nvquanghuy any status?
or @phuongduyphan, i don't know who is main maintainer)))
@phuongduyphan @nvquanghuy is this proposall accepted, rejected, pending, or what? Am i need to fork this spec and all plugins or what?
Does DBML specification has any committee to discuss and make decisions on proposals? Or i just write these questions into the void and one of cool projects is dead again?
Hi @quenbyako, apologize for the late response. We've been having a bit of a manpower issue internally and I'm trying to sort this out, that's why this has been put on hold. Once we sort that out we'll be resuming to look into this. I understand Struct is super common, so I'm keen to get this implemented asap.
@nvquanghuy thanks for answer!
I'll try to provide more info about struct types in different databases (like add here more info about how to manage types in mysql, postgres, etc)
Glad to hear that proposal is accepted!
@nvquanghuy came back after researching:
| sql db name | how to create custom type |
|---|---|
| mysql | native types not supported (you need to create a separate table with a structure and link it with the desired table) |
| postgres | super simple |
| mariadb | same as mysql (but they have proposal at least) |
| sqlite | same as mysql |
| mssql | has CREATE TYPE statement |
| oracle db | also has custom types (see "Purchase Order Example" in "User-Defined Datatype Categories") |
I would be interested about any updates on this feature request, would be extremely useful to document properly custom types.