drop unused arguments.

This commit is contained in:
Kei Hibino 2017-03-31 16:15:42 +09:00
parent 76e3d3c582
commit 4e37d12e6e
2 changed files with 4 additions and 6 deletions

View File

@ -243,9 +243,8 @@ makeRecordPersistableWithSqlTypeWithConfig :: TypeQ -- ^ SQL value type
-> NameConfig -- ^ name rule config
-> String -- ^ Schema name of database
-> String -- ^ Table name of database
-> Int -- ^ Count of record columns
-> Q [Dec] -- ^ Result declarations
makeRecordPersistableWithSqlTypeWithConfig sqlValueType config schema table _width =
makeRecordPersistableWithSqlTypeWithConfig sqlValueType config schema table =
makeRecordPersistableWithSqlType
sqlValueType
$ recordType config schema table
@ -254,7 +253,6 @@ makeRecordPersistableWithSqlTypeWithConfig sqlValueType config schema table _wid
makeRecordPersistableWithSqlTypeDefault :: TypeQ -- ^ SQL value type
-> String -- ^ Schema name
-> String -- ^ Table name
-> Int -- ^ Count of record columns
-> Q [Dec] -- ^ Result declarations
makeRecordPersistableWithSqlTypeDefault sqlValueType =
makeRecordPersistableWithSqlTypeWithConfig sqlValueType defaultNameConfig
@ -319,7 +317,7 @@ defineRecordWithConfig :: TypeQ -- ^ SQL value type
-> Q [Dec] -- ^ Result declarations
defineRecordWithConfig sqlValueType config schema table columns derives = do
typ <- defineRecordTypeWithConfig config schema table columns derives
withSql <- makeRecordPersistableWithSqlTypeWithConfig sqlValueType config schema table $ length columns
withSql <- makeRecordPersistableWithSqlTypeWithConfig sqlValueType config schema table
return $ typ ++ withSql

View File

@ -71,7 +71,7 @@ defineTableDefault' :: Config -- ^ Configuration to generate query wi
-> Q [Dec] -- ^ Result declaration
defineTableDefault' config schema table columns derives = do
modelD <- Relational.defineTableTypesAndRecord config schema table columns derives
sqlvD <- makeRecordPersistableWithSqlTypeDefault [t| SqlValue |] schema table $ length columns
sqlvD <- makeRecordPersistableWithSqlTypeDefault [t| SqlValue |] schema table
return $ modelD ++ sqlvD
-- | Generate all HDBC templates about table using default naming rule.
@ -85,7 +85,7 @@ defineTableDefault :: Config -- ^ Configuration to generate query wit
-> Q [Dec] -- ^ Result declaration
defineTableDefault config schema table columns derives primary notNull = do
modelD <- Relational.defineTable config schema table columns derives primary notNull
sqlvD <- makeRecordPersistableWithSqlTypeDefault [t| SqlValue |] schema table $ length columns
sqlvD <- makeRecordPersistableWithSqlTypeDefault [t| SqlValue |] schema table
return $ modelD ++ sqlvD
-- | Generate all HDBC templates using system catalog informations with specified config.