[openstack-dev] [oslo.db] [ndb] ndb namespace throughout openstack projects
jaypipes at gmail.com
Wed Jul 26 23:43:58 UTC 2017
On 07/26/2017 07:06 PM, Octave J. Orgeron wrote:
> Hi Michael,
> On 7/26/2017 4:28 PM, Michael Bayer wrote:
>> it at all.
>> thinking out loud
>> oslo_db.sqlalchemy.types.String(255, mysql_small_rowsize=64)
>> oslo_db.sqlalchemy.types.String(255, mysql_small_rowsize=sa.TINYTEXT)
>> oslo_db.sqlalchemy.types.String(255, mysql_small_rowsize=sa.TEXT)
>> so if you don't have mysql_small_rowsize, nothing happens.
> I think the mysql_small_rowsize is a bit misleading since in one case we
> are changing the size and the others the type. Perhaps:
> alt standing for alternate. What do you think?
I think it should be specific to NDB, since that's what the override is
for. I'd support something like:
Octave, I understand due to the table row size limitations the desire to
reduce some column sizes for NDB. What I'm not entirely clear on is the
reason to change the column *type* specifically for NDB. There are
definitely cases where different databases have column types -- say,
PostgreSQL's INET column type -- that don't exist in other RDBMS. For
those cases, the standard approach in SQLAlchemy is to create a
sqlalchemy ColumnType concrete class that essentially translates the
CREATE TABLE statement (and type compilation/coercing) to specify the
supported column type in the RDBMS if it's supported otherwise defaults
the column type to something coerceable.
An example of this can be seen here for how this is done for IPv4 data
in the apiary project:
I'd certainly be open to doing things like this for NDB, but I'd first
need to understand why you chose to convert the column types for the
columns that you did. Any information you can provide about that would
More information about the OpenStack-dev