mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2025-01-08 14:26:33 +03:00
drop unused arguments.
This commit is contained in:
parent
76e3d3c582
commit
4e37d12e6e
@ -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
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user