Henrik Vendelbo wrote:
Hi guys,
Hi Hendrik, welcome and we hope you find MonetDB useful for your project.
I am jumping straight into the deep end with Monet. My first task is to implement a backend for Django written in Django.
I need to map the field types to SQL column types, and that is for the most part easy, yet a few questions:
1) Is 'integer' accepted, or do I have to use 'int'
MonetDB follows the SQL standard as close as possible. For the type information see: http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/Data-Types.html
2) How do I specify a floating point with specified max_digits and decimal_places? I didn't see support for numeric in the docs. 3) How do I specify unsigned integers? unsigned or check expression? Is there a text field, or should I use varchar/clob ?
These are my definitions as they stand so far:
DATA_TYPES = { 'AutoField': 'serial', 'BooleanField': 'boolean', 'CharField': 'varchar(%(maxlength)s)', 'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)', 'DateField': 'date', 'DateTimeField': 'timestamp', 'FileField': 'varchar(100)', 'FilePathField': 'varchar(100)', 'FloatField': 'numeric(%(max_digits)s, %(decimal_places)s)', 'ImageField': 'varchar(100)', 'IntegerField': 'int', 'IPAddressField': 'char(15)', 'ManyToManyField': None, 'NullBooleanField': 'bool', 'OneToOneField': 'int', 'PhoneNumberField': 'varchar(20)', 'PositiveIntegerField': 'integer unsigned', # TODO how should this be handled??? 'PositiveSmallIntegerField': 'smallint unsigned', # TODO how should this be handled??? 'SlugField': 'varchar(%(maxlength)s)', 'SmallIntegerField': 'smallint', 'TextField': 'text', 'TimeField': 'time', 'USStateField': 'varchar(2)', }
Thanks,
Henrik
------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao... _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users