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
The regex used to parse table commands identified below does not currently allow for creating a table based on a query. This prevents the use of tables as materialized views.
Example
create_table:long_query,as: "SELECT * FROM orders INNER JOIN line_items ON order_id=orders.id")
generates:
CREATETABLE "long_query" ASSELECT*FROM orders INNER JOIN line_items ON order_id=orders.id
and in the assemble method example create_as? to choose the proper reconstruction. The create_as? boolean would need to be added to the doc as part of the API.
Plus would need to set up a test for this case in spec/sql_struct_spec.rb (Of course do that first and see that it fails!)
...any interest in doing this? If not I'll get to it when I get a chance but might not be several weeks.
The regex used to parse table commands identified below does not currently allow for creating a table based on a query. This prevents the use of tables as materialized views.
Example
generates:
https://github.com/SchemaPlus/schema_plus_core/blob/master/lib/schema_plus/core/sql_struct.rb#L12-L14
The text was updated successfully, but these errors were encountered: