-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for SQL views #81
Comments
Thinking about this some more, I would like to reserve the "type" column of the "table" table to tell VALVE about the structure of that table, such as the columns to expect. The current table types do that: table, column, datatype, rule. I've been thinking about adding an 'ldtab' table type, which would also determine which columns that table has. In contrast, 'view' does not tell VALVE anything about the columns to expect, so 'view' is not a good table type (on this line of reasoning). Now I think it would be better to have another column of the "table" table for this purpose. Maybe "mode" is a good name for it. This issue is about the 'view' mode. #82 is about the 'generated' mode. We probably want a 'readonly' mode. Instead of "mode", another idea is an "options" column, with a space-separated list of options, which could include 'view', 'generated', etc. |
In terms of the list of things to be implemented in #81 (comment), this commit address points 1-5.
In terms of the list of things to be implemented in #81 (comment), this commit address points 1-5.
In terms of the list of things to be implemented in #81 (comment), this commit address points 1-5.
Here is a small table describing what was decided on 2024-03-05 about view, readonly, and normal tables (we have decided to collapse the distinction between readonly and generated modes since the only thing that distinguishes them is the kind of path each has).
|
I want VALVE to support SQL views in the following ways:
*_conflict
table, or*_view
or*_text
viewsa. VALVE will expect it to be a SQL file or it will exit with an error
b.
create_all_tables()
will create the view by executing that SQL, and ensure that the view exists afterward or exit with an errorc.
drop_tables()
anddrop_all_tables()
will drop the viewa.
create_all_tables()
will ensure that the view exists afterward or exit with an errorb.
drop_tables()
anddrop_all_tables()
will skip the viewvalve.sort_tables()
should work for views...validate_row()
, since its columns will be definedfrom(view.column)
, VALVE will not try to enforce a foreign key constraint for T, but VALVE should still supportget_matching_values()
for that column of T -- I think the same should apply forunder()
andtree()
but I'm not sureThe text was updated successfully, but these errors were encountered: