- All Implemented Interfaces:
QtObjectInterface
,Cloneable
Handles a connection to a database
Java wrapper for Qt class QSqlDatabase
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor for internal use only.QSqlDatabase
(QSqlDatabase other) protected
QSqlDatabase
(QSqlDriver driver) protected
QSqlDatabase
(String type) -
Method Summary
Modifier and TypeMethodDescriptionstatic QSqlDatabase
addDatabase
(QSqlDriver driver) Overloaded function foraddDatabase(io.qt.sql.QSqlDriver, java.lang.String)
withconnectionName = defaultConnection()
.static QSqlDatabase
addDatabase
(QSqlDriver driver, String connectionName) static QSqlDatabase
addDatabase
(String type) Overloaded function foraddDatabase(java.lang.String, java.lang.String)
withconnectionName = defaultConnection()
.static QSqlDatabase
addDatabase
(String type, String connectionName) clone()
static QSqlDatabase
cloneDatabase
(QSqlDatabase other, String connectionName) static QSqlDatabase
cloneDatabase
(String other, String connectionName) final void
close()
final boolean
commit()
final String
static QStringList
final String
static boolean
contains()
Overloaded function forcontains(java.lang.String)
withconnectionName = defaultConnection()
.static boolean
static QSqlDatabase
database()
Overloaded function fordatabase(java.lang.String, boolean)
static QSqlDatabase
Overloaded function fordatabase(java.lang.String, boolean)
withopen = true
.static QSqlDatabase
final String
static String
final QSqlDriver
driver()
final String
static QStringList
drivers()
final QSqlQuery
exec()
Overloaded function forexec(java.lang.String)
withquery = ""
.final QSqlQuery
final String
hostName()
static boolean
isDriverAvailable
(String name) final boolean
isOpen()
final boolean
final boolean
isValid()
final QSqlError
final boolean
open()
final boolean
final String
password()
final int
port()
final QSqlIndex
primaryIndex
(String tablename) final QSqlRecord
static void
registerSqlDriver
(String name, QSqlDriverCreatorBase creator) static void
removeDatabase
(String connectionName) final boolean
rollback()
final void
Overloaded function forsetConnectOptions(java.lang.String)
withoptions = ""
.final void
setConnectOptions
(String options) final void
setDatabaseName
(String name) static void
setDefaultConnection
(String defaultConnection) final void
setHostName
(String host) final void
setNumericalPrecisionPolicy
(QSql.NumericalPrecisionPolicy precisionPolicy) final void
setPassword
(String password) final void
setPort
(int p) final void
setUserName
(String name) final QStringList
tables()
Overloaded function fortables(io.qt.sql.QSql.TableType)
withtype = io.qt.sql.QSql.TableType.Tables
.final QStringList
tables
(QSql.TableType type) toString()
final boolean
final String
userName()
Methods inherited from class io.qt.QtObject
dispose, equals, isDisposed
-
Constructor Details
-
QSqlDatabase
public QSqlDatabase() -
QSqlDatabase
-
QSqlDatabase
-
QSqlDatabase
-
QSqlDatabase
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
close
-
commit
-
connectOptions
-
connectionName
-
databaseName
-
driver
-
driverName
-
exec
Overloaded function for
exec(java.lang.String)
withquery = ""
. -
exec
-
hostName
-
isOpen
-
isOpenError
-
isValid
-
lastError
-
numericalPrecisionPolicy
-
open
-
open
-
password
-
port
-
-
record
-
rollback
-
setConnectOptions
Overloaded function for
setConnectOptions(java.lang.String)
withoptions = ""
. -
setConnectOptions
-
setDatabaseName
-
setHostName
-
setNumericalPrecisionPolicy
@QtUninvokable public final void setNumericalPrecisionPolicy(QSql.NumericalPrecisionPolicy precisionPolicy) -
setPassword
-
setPort
-
setUserName
-
tables
Overloaded function for
tables(io.qt.sql.QSql.TableType)
withtype = io.qt.sql.QSql.TableType.Tables
. -
tables
-
transaction
-
userName
-
addDatabase
Overloaded function for
addDatabase(io.qt.sql.QSqlDriver, java.lang.String)
withconnectionName = defaultConnection()
. -
addDatabase
-
addDatabase
Overloaded function for
addDatabase(java.lang.String, java.lang.String)
withconnectionName = defaultConnection()
. -
addDatabase
-
cloneDatabase
-
cloneDatabase
-
connectionNames
-
contains
public static boolean contains()Overloaded function for
contains(java.lang.String)
withconnectionName = defaultConnection()
. -
contains
-
database
Overloaded function for
database(java.lang.String, boolean)
withopen = true
. -
database
Overloaded function for
database(java.lang.String, boolean)
with:
connectionName = defaultConnection()
open = true
-
database
-
drivers
-
isDriverAvailable
-
registerSqlDriver
-
removeDatabase
-
setDefaultConnection
-
defaultConnection
-
toString
-
clone
-