Closed surister closed 3 weeks ago
This PR allows for extracting properties defined by [ WITH ( parameter [= value] [, ... ] ) ] statements.
[ WITH ( parameter [= value] [, ... ] ) ]
For example:
from cratedb_sqlparse import sqlparse stmt = sqlparse(""" CREATE TABLE doc.tbl12 (A TEXT) WITH ( "allocation.max_retries" = 5, "blocks.metadata" = false ); """)[0] print(stmt.metadata) # Metadata(schema='doc', table_name='tbl12', interpolated_properties={}, with_properties={'allocation.max_retries': '5', 'blocks.metadata': 'false'})
It also handles the special case of what I call, interpolated values and #31 if you have a better name recommendation, please go ahead :P
interpolated values
Summary of the changes / Why this is an improvement
This PR allows for extracting properties defined by
[ WITH ( parameter [= value] [, ... ] ) ]
statements.For example:
It also handles the special case of what I call,
interpolated values
and #31 if you have a better name recommendation, please go ahead :PChecklist