mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Support for PostgreSQL serial
This commit is contained in:
parent
8255d3e3b2
commit
e53bbcc9bd
@ -169,7 +169,12 @@ ddlName = Or([ddlTerm, ddlString])
|
||||
ddlArguments = "(" + delimitedList(Or([ddlString, ddlTerm, ddlNum])) + ")"
|
||||
ddlNotNull = Group(ddlWord("NOT") + ddlWord("NULL")).setResultsName("notNull")
|
||||
ddlDefaultValue = ddlWord("DEFAULT").setResultsName("hasDefaultValue")
|
||||
ddlAutoValue = ddlWord("AUTO_INCREMENT").setResultsName("hasAutoValue")
|
||||
ddlAutoValue = Or([
|
||||
ddlWord("AUTO_INCREMENT"),
|
||||
ddlWord("SMALLSERIAL"),
|
||||
ddlWord("SERIAL"),
|
||||
ddlWord("BIGSERIAL"),
|
||||
]).setResultsName("hasAutoValue")
|
||||
ddlColumnComment = Group(ddlWord("COMMENT") + ddlString).setResultsName("comment")
|
||||
ddlConstraint = Or([
|
||||
ddlWord("CONSTRAINT"),
|
||||
@ -192,9 +197,12 @@ ddl.ignore(ddlComment)
|
||||
types = {
|
||||
'tinyint': 'tinyint',
|
||||
'smallint': 'smallint',
|
||||
'smallserial': 'smallint', # PostgreSQL
|
||||
'integer': 'integer',
|
||||
'int': 'integer',
|
||||
'serial': 'integer', # PostgreSQL
|
||||
'bigint': 'bigint',
|
||||
'bigserial': 'bigint', # PostgreSQL
|
||||
'char': 'char_',
|
||||
'varchar': 'varchar',
|
||||
'text': 'text',
|
||||
|
Loading…
Reference in New Issue
Block a user