Support for unsigned integer types coming any time soon?

May 29, 2014 at 11:51 PM
Edited May 29, 2014 at 11:54 PM
Support for unsigned integer types coming any time soon?

Right now all of my UNSIGNED INT columns are showing up as INT.
Coordinator
May 30, 2014 at 2:49 PM
AFAIK unsigned INTs are MySQL only. There's no equivalent in SqlServer, Oracle, PostgreSql etc.

I'll see what I can do- if I can get the information out from the Information_Schema metadata, I can use it.
May 30, 2014 at 9:14 PM
Sounds great. Thanks.

PS: Looks like Sybase also supports unsigned types: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1510/html/iqrefbb/X315932.htm

PPS: Also, watch out for tinyint. It's unsigned (8-bit, 0-255) on most—if not all—systems that support an 8-bit integer type.
Jun 2, 2014 at 7:59 PM
Is 1.3.4.0 (edits 34576 & 34577 on May 30) supposed to address this?
Coordinator
Jun 3, 2014 at 10:10 AM
Yes, the patch (actually a one liner) keeps the unsigned marker - at least against the MySQL version I have.

I don't think the functionality for simple database translations will work- I need to test more. So this may not be the final version, but it may be what you need.
Jun 3, 2014 at 7:37 PM
Just retried after applying 34576 & 34577 patches.

UNSIGNED INT columns still showing up as INT.

I'll keep an eye on the source history.

Thanks for working on this.
Coordinator
Jun 3, 2014 at 8:10 PM
MySQL version?
Jun 4, 2014 at 4:39 AM
5.5.24 on Mavericks
Coordinator
Jul 27, 2014 at 6:55 AM
Just released v1.3.4.0
The UNSIGNED flag is available as part of the DatabaseColumn.DbDataType string (eg "smallint(5) unsigned"- so to extract it, just do an .IndexOf("unsigned")!=-1 )

I didn't like adding a new property .IsUnsigned as I don't want to add more datatype properties (we already have DbDataType string, DataType object, Length, Precision, Scale, DateTimePrecision ... ). Instead there's an extension DatabaseColumn.DataTypeDefinition() that gives the DDL string, which ties up all these different properties.