mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
Fix insert calling wrong function (#17856)
The `insert` method is calling `tryInsertID`, which ignores the `pkName` parameter. Calling `tryInsert` instead should be correct.
This commit is contained in:
@@ -524,7 +524,7 @@ proc insert*(db: DbConn, query: SqlQuery, pkName: string,
|
||||
{.tags: [WriteDbEffect], since: (1, 3).} =
|
||||
## executes the query (typically "INSERT") and returns the
|
||||
## generated ID
|
||||
result = tryInsertID(db, query, args)
|
||||
result = tryInsert(db, query, pkName, args)
|
||||
if result < 0: dbError(db)
|
||||
|
||||
proc execAffectedRows*(db: DbConn, query: SqlQuery,
|
||||
|
||||
Reference in New Issue
Block a user