You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MariaDB: offer a value picker for a column CHECK (col IN (...)) #4424
A MariaDB column with CHECK (status IN ('new','paid')) gets no value picker in the grid, no value completion and no allowed_values in MCP describe_table. The same check on SQLite gives a grid picker.
The app's fallback reads the table DDL and matches CHECK ("col" IN (...)) (apple/TablePro/Core/Services/Query/QuerySqlParser.swift:107-122, apple/TablePro/Views/Main/MainContentCoordinator.swift:1199-1228). MariaDB prints backticks, CHECK (`status` in ('new','paid')), so it never matches outside ANSI_QUOTES.
Proposed solution
The MariaDB driver already reads each column's own CHECK clause from INFORMATION_SCHEMA.CHECK_CONSTRAINTS into columnCheck (apple/Plugins/MySQLDriverPlugin/MySQLPluginDriver+Schema.swift:123-127, MySQLColumnChecks.swift:193-231), but fills allowedValues only from ENUM and SET (MySQLPluginDriver+Schema.swift:118). When the whole clause is `col` IN ('a', 'b', ...) with string literals only, set allowedValues from it. The grid picker, completion, MCP describe_table and Generate Rows already read allowedValues (apple/TablePro/Core/Plugins/PluginObjectMapping.swift:26).
Table-level checks (LEVEL = 'Table') and MySQL 8, which writes CHECK ((`status` in (_utf8mb4'new',_utf8mb4'paid'))), could follow.
Alternatives considered
Teach the app's DDL regex backticks. That keeps a DDL read on every table open and parses engine syntax in the app.
Activity