0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Merge pull request #221 from sjoubert/postgresql_type_aliases

Add more PostgreSQL type mapping in ddl2cpp
This commit is contained in:
Roland Bock 2018-04-13 08:48:26 +02:00 committed by GitHub
commit 867043d9c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,14 +212,18 @@ types = {
'tinyint': 'tinyint',
'smallint': 'smallint',
'smallserial': 'smallint', # PostgreSQL
'int2': 'smallint', #PostgreSQL
'integer': 'integer',
'int': 'integer',
'serial': 'integer', # PostgreSQL
'int4': 'integer', #PostgreSQL
'mediumint' : 'integer',
'bigint': 'bigint',
'bigserial': 'bigint', # PostgreSQL
'int8': 'bigint', #PostgreSQL
'char': 'char_',
'varchar': 'varchar',
'character varying': 'varchar', #PostgreSQL
'text': 'text',
'clob': 'text',
'tinyblob': 'blob',
@ -229,12 +233,22 @@ types = {
'bool': 'boolean',
'boolean': 'boolean',
'double': 'floating_point',
'float8': 'floating_point', # PostgreSQL
'float': 'floating_point',
'float4': 'floating_point', # PostgreSQL
'numeric': 'floating_point', # PostgreSQL
'date': 'day_point',
'datetime': 'time_point',
'time without time zone': 'time_point', # PostgreSQL
'time with time zone': 'time_point', # PostgreSQL
'timestamp': 'time_point',
'timestamp without time zone': 'time_point', # PostgreSQL
'timestamp with time zone': 'time_point', # PostgreSQL
'timestamptz': 'time_point', # PostgreSQL
'enum': 'text', # MYSQL
'set': 'text', # MYSQL,
'json' : 'text', # PostgreSQL
'jsonb' : 'text', # PostgreSQL
'tinyint unsigned': 'tinyint_unsigned', #MYSQL
'smallint unsigned': 'smallint_unsigned', #MYSQL
'integer unsigned': 'integer_unsigned', #MYSQL