feature: Table DDL #90
Labels
No labels
CI/CD
UI/UX
autorelease: pending
bug
docs
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
size
L
size
M
size
S
size
XL
size
XS
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/dadbod-ui.nvim#90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Did you check the docs?
Is your feature request related to a problem? Please describe.
I want to be able to
script aswith tablesThis will let me
altertables easierDescribe the solution you'd like
DDL generation, like what we have for stored procs today
Describe alternatives/other solutions you've considered
manual generation, too cumbersom
Additional context
No response
Moving the implementation notes here from
CURRENT_SUPPORT.md, since this issue is where the work gets tracked.This is not one feature, it splits hard by engine. Tables and routines arent symmetric: postgres hands you
pg_get_functiondeffor a routine but has nopg_get_tabledef.CREATE TABLEstrategySELECT sql FROM sqlite_master, returns the original DDL verbatimSHOW CREATE TABLESHOW CREATE TABLEDBMS_METADATA.GET_DDLpg_get_constraintdef/pg_get_indexdefSuggested phasing:
SELECT To,INSERT To,UPDATE To,DELETE To,DROP Toneed only the column list, notCREATE TABLE. They are generatable server side in the stylepostgres.luaalready uses, and they ship a useful menu on every adapter without touching the hard part.CREATE To. One query each.CREATE To, one server built query.CREATE To, the hardest.Honest caveat: the tail on 3 and 4 is unbounded. Identity vs serial, collations, generated columns, storage params, partitioning, inheritance. Each is small, they never stop arriving, and each absence reads as a bug. Aim for good enough, honestly labeled.
The plumbing is mostly in place:
routine_script.luanever branches onkindinternally,drawer/actions.luadispatches viaon_activatewith no type branches,Query:write_scriptalready takes{ table, schema }, and table nodes are already expandable with children.