<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jul 26, 2017 7:45 PM, "Jay Pipes" <<a href="mailto:jaypipes@gmail.com">jaypipes@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On 07/26/2017 07:06 PM, Octave J. Orgeron wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Michael,<br>
<br>
On 7/26/2017 4:28 PM, Michael Bayer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
it at all.<br>
thinking out loud<br>
<br>
oslo_db.sqlalchemy.types.Strin<wbr>g(255, mysql_small_rowsize=64)<br>
oslo_db.sqlalchemy.types.Strin<wbr>g(255, mysql_small_rowsize=sa.TINYTEX<wbr>T)<br>
oslo_db.sqlalchemy.types.Strin<wbr>g(255, mysql_small_rowsize=sa.TEXT)<br>
<br>
<br>
so if you don't have mysql_small_rowsize, nothing happens.<br>
<br>
</blockquote>
<br>
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:<br>
<br>
mysql_alt_size=64<br>
mysql_alt_type=sa.TINYTEXT<br>
mysql_alt_type=sa.TEXT<br>
<br>
alt standing for alternate. What do you think?<br>
</blockquote>
<br></div>
-1<br>
<br>
I think it should be specific to NDB, since that's what the override is for. I'd support something like:<br>
<br>
oslo_db.sqlalchemy.types.Stri<wbr>ng(255, mysql_ndb_size=64)<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">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...</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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.<br>
<br>
An example of this can be seen here for how this is done for IPv4 data in the apiary project:<br>
<br>
<a href="https://github.com/gmr/apiary/blob/master/apiary/types.py#L49" rel="noreferrer" target="_blank">https://github.com/gmr/apiary/<wbr>blob/master/apiary/types.py#L4<wbr>9</a><br>
<br>
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.<br>
<br>
Best,<br>
-jay<div class="elided-text"><br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</div></blockquote></div><br></div></div></div>