Create all the tables in the database at once

Use this forum to request new features or suggest modifications to existing features

Create all the tables in the database at once

Postby wcdmaxp » Sat Dec 17, 2011 11:17 am

Hi, I think it would be great if we could create all the tables in the database at once. Like: qx::dao::createTables(). What you think?


Best regards,
wcdmaxp
 
Posts: 1
Joined: Sat Dec 17, 2011 11:12 am

Re: Create all the tables in the database at once

Postby QxOrm admin » Sat Dec 17, 2011 6:07 pm

Hi,

Because tables creation is very specific for each database, I strongly recommend to create your own script or SQL schema : using introspection engine of QxOrm library, it's very easy to create it.

There is a Question&Response into the FAQ of QxOrm library with an example of code for a PostgreSQL database (How to build SQL schema (create and update tables) based on C++ persistents classes registered into QxOrm context ?) :
http://www.qxorm.com/qxorm_en/faq.html#faq_230

QxOrm library provides also an example of a C++ function : based on this function, you can create your own function to build SQL schema.
This QxOrm function is written in the file ./src/QxRegister/QxClassX.cpp and is called QString qx::QxClassX::dumpSqlSchema() :
http://www.qxorm.com/qxorm_en/resource/ ... chema.html
QxOrm admin
 


Return to QxOrm - Feature request

Who is online

Users browsing this forum: No registered users and 2 guests

cron