kwargs['precision'] = numericprec
coltype = coltype(**kwargs)
- colargs = []
cdict = {
'name' : name,
'type' : coltype,
'nullable' : nullable,
'default' : default,
- 'attrs' : colargs
}
cols.append(cdict)
# autoincrement and identity
elif default == 'NULL':
# eliminates the need to deal with this later.
default = None
- col_d = dict(name=name, type=type_instance, attrs={},
- default=default)
+ col_d = dict(name=name, type=type_instance, default=default)
col_d.update(col_kw)
state.columns.append(col_d)
'type': coltype,
'nullable': nullable,
'default': default,
- 'attrs': {}
}
columns.append(cdict)
return columns
default = match.group(1) + ('"%s"' % sch) + '.' + match.group(2) + match.group(3)
column_info = dict(name=name, type=coltype, nullable=nullable,
- default=default, attrs={})
+ default=default)
columns.append(column_info)
return columns
'type' : coltype,
'nullable' : nullable,
'default' : default,
- 'attrs' : {},
'primary_key': primary_key
})
return columns
default
the column's default value
- attrs
- dict containing optional column attributes
+ autoincrement
+ boolean
+
+ sequence
+ a dictionary of the form
+ {'name' : str, 'start' :int, 'increment': int}
+
+ Additional column attributes may be present.
"""
raise NotImplementedError()
coltype = col_d['type']
nullable = col_d['nullable']
default = col_d['default']
- attrs = col_d['attrs']
- # construct additional colargs with attrs
- # currently, it's not used here.
colargs = []
col_kw = {}
if 'autoincrement' in col_d: