[openstack-dev] [oslo.db] [ndb] ndb namespace throughout openstack projects
mbayer at redhat.com
Wed Jul 26 23:58:05 UTC 2017
On Jul 26, 2017 7:45 PM, "Jay Pipes" <jaypipes at gmail.com> wrote:
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:
Ok, I give up on that fight, fine. mysql_ndb_xyz but at least build it
into a nicely named type. I know i come off as crazy changing my mind and
temporarily forgetting key details but this is often how I internally come
up with things...
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
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 be great.
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev