0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

ddl2cpp solutions

This commit is contained in:
“digitalist.ru” 2016-03-22 00:27:01 +03:00
parent c43b8272ba
commit 64a122b64a

View File

@ -127,7 +127,7 @@ types = {
'float': 'floating_point',
'date' : 'day_point',
'datetime' : 'time_point',
'timestamp' : 'time_point',
#'timestamp' : 'time_point',
}
@ -185,7 +185,7 @@ for create in tableCreations:
try:
traitslist = [NAMESPACE + '::' + types[sqlColumnType]];
except KeyError as e:
print ('Error: datatype "' + sqlColumnType + '"" is not supported. Implement it (examples: sqlpp11/data_types) or raise an issue on github')
print ('Error: datatype "' + sqlColumnType + '"" is not supported.')
DataTypeError = True
requireInsert = True
if column.hasAutoValue:
@ -224,4 +224,8 @@ print('}', file=header)
print('#endif', file=header)
if (DataTypeError):
print("Error: unsupported datatypes." )
print("Possible solutions:")
print("A) Implement this datatype (examples: sqlpp11/data_types)" )
print("B) Extend/upgrade ddl2cpp (edit types map)" )
print("C) Raise an issue on github" )
sys.exit(10) #return non-zero error code, we might need it for automation