Skip to content

Commit

Permalink
Add qsqldatabase.getQSqlDatabase, which is bound to
Browse files Browse the repository at this point in the history
QSqlDatabase::database.
  • Loading branch information
philip-wernersbach committed Jun 2, 2017
1 parent fe13cd6 commit 69f8dc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qt5_qtsql.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Package]
name = "qt5_qtsql"
version = "1.0.1"
version = "1.0.2"
author = "Philip Wernersbach <philip.wernersbach@gmail.com>"
description = "Binding for Qt 5's Qt SQL library. Provides a single API for multiple database engines."
license = "MIT"
Expand Down
2 changes: 2 additions & 0 deletions qt5_qtsql/src/qsqldatabase.nim
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ template newQSqlDatabase*(typ: cstring, connectionName: cstring): expr =
# self.up.cppDelete()
# self.up = nil

proc getQSqlDatabase*(connectionName: cstring, open = true): QSqlDatabaseObj {.header: QSQLDATABASE_H, importcpp: "QSqlDatabase::database(@)".}

proc internalOpen(self: QSqlDatabaseObj): bool {.header: QSQLDATABASE_H, importcpp: "open".}
proc internalOpen(self: QSqlDatabaseObj, user: cstring, password: cstring): bool {.header: QSQLDATABASE_H, importcpp: "open".}
proc lastError*(self: QSqlDatabaseObj): QSqlErrorObj {.header: QSQLDATABASE_H, importcpp: "lastError".}
Expand Down

0 comments on commit 69f8dc2

Please sign in to comment.