kayak / pypika

PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis.
http://pypika.readthedocs.io/en/latest/
Apache License 2.0
2.43k stars 293 forks source link

Add additional body statements/table options to query builders #714

Open hmlamad opened 1 year ago

hmlamad commented 1 year ago

hi all

MySQLQuery.create_table(country_table)\
    .columns(
        Column('hashkey',  "VARCHAR(50)" , nullable=False, default=ValueWrapper(""))
    )

currently I am having such an object in order to achieve

CREATE TABLE `countries` (
    `hashkey` VARCHAR(50) NOT NULL DEFAULT ''
    UNIQUE INDEX `hashkey2` (`hashkey`) USING BTREE
)
COLLATE='utf8_general_ci'

I need to add some statements to the body and the table option but wondering how can I add them

or simply, at this moment it is not supported?