On Wed, Apr 17, 2019 at 09:15:52PM +0200, Markus Elfring <Mar...@we...> wrote:
> >> * Encapsulation of table creation parameters
> >>
> >> * Determination of generated data structures from the database
> >
> > What do you want to know in these areas?
>
> * Which parameters (and corresponding classes) will matter for table creation
> besides the name (and a query object)?
``SQLObject.createTable()`` calls ``connection.createTable()`` which
calls ``connection.createTableSQL()``[1] which uses ``sqlmeta.table`` to
get the table's name, the list of columns from ``sqlmeta.columnList``
and optional ``sqlmeta.createSQL`` for extra SQL.
1. https://github.com/sqlobject/sqlobject/blob/ed64be0ed032055b0a6613fe3051d83a74ded566/sqlobject/dbconnection.py#L566
> * How convenient and safe is the supported database introspection currently?
> (The documentation seems to be terse on this software area.)
It's not convenient as it can only get the list of columns for a
table and guess their types.
It's only safe for the most debugged drivers -- MySQL, PostgreSQL and
SQLite.
> Regards,
> Markus
Oleg.
--
Oleg Broytman https://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|