- 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
ModifierConstructorDescriptionQSqlDatabase
(QSqlDatabase other) protected
QSqlDatabase
(String type) protected
QSqlDatabase
(QSqlDriver driver) -
Method Summary
Modifier and TypeMethodDescriptionstatic QSqlDatabase
addDatabase
(String type) Overloaded function foraddDatabase(java.lang.String, java.lang.String)
withconnectionName = defaultConnection()
.static QSqlDatabase
addDatabase
(String type, String connectionName) static QSqlDatabase
addDatabase
(QSqlDriver driver) Overloaded function foraddDatabase(io.qt.sql.QSqlDriver, java.lang.String)
withconnectionName = defaultConnection()
.static QSqlDatabase
addDatabase
(QSqlDriver driver, String connectionName) final void
assign
(QSqlDatabase other) clone()
Creates and returns a copy of this object.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
SeeQSqlDatabase::
defaultConnection final QSqlDriver
driver()
final String
static QStringList
drivers()
final QSqlQuery
exec()
Overloaded function forexec(java.lang.String)
withquery = (String)null
.final QSqlQuery
SeeQSqlDatabase::
exec(QString)const static String
Kotlin property getter.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 = (String)null
.final void
setConnectOptions
(String options) final void
setDatabaseName
(String name) static void
setDefaultConnection
(String defaultConnection) SeeQSqlDatabase::
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()
Seeoperator<<(QDebug,
QSqlDatabase) final boolean
final String
userName()
Methods inherited from class io.qt.QtObject
dispose, equals, isDisposed
-
Constructor Details
-
QSqlDatabase
public QSqlDatabase() -
QSqlDatabase
-
QSqlDatabase
-
QSqlDatabase
-
-
Method Details
-
close
-
commit
-
connectOptions
-
connectionName
-
databaseName
-
driver
-
driverName
-
exec
See
QSqlDatabase::
exec(QString)const -
hostName
-
isOpen
-
isOpenError
-
isValid
-
lastError
-
numericalPrecisionPolicy
-
open
-
open
-
assign
-
password
-
port
-
-
record
-
rollback
-
setConnectOptions
-
setDatabaseName
-
setHostName
-
setNumericalPrecisionPolicy
@QtUninvokable public final void setNumericalPrecisionPolicy(QSql.NumericalPrecisionPolicy precisionPolicy) -
setPassword
-
setPort
-
setUserName
-
tables
-
transaction
-
userName
-
addDatabase
-
addDatabase
-
cloneDatabase
-
cloneDatabase
-
connectionNames
-
contains
-
database
-
drivers
-
isDriverAvailable
-
registerSqlDriver
-
removeDatabase
-
setDefaultConnection
See
QSqlDatabase::
defaultConnection -
defaultConnection
See
QSqlDatabase::
defaultConnection -
toString
See
operator<<(QDebug,
QSqlDatabase) -
clone
Creates and returns a copy of this object.
-
exec
Overloaded function for
exec(java.lang.String)
withquery = (String)null
. -
setConnectOptions
Overloaded function for
setConnectOptions(java.lang.String)
withoptions = (String)null
. -
tables
Overloaded function for
tables(io.qt.sql.QSql.TableType)
withtype = io.qt.sql.QSql.TableType.Tables
. -
addDatabase
Overloaded function for
addDatabase(io.qt.sql.QSqlDriver, java.lang.String)
withconnectionName = defaultConnection()
. -
addDatabase
Overloaded function for
addDatabase(java.lang.String, java.lang.String)
withconnectionName = defaultConnection()
. -
contains
public static boolean contains()Overloaded function for
contains(java.lang.String)
withconnectionName = defaultConnection()
. -
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
-
getDefaultConnection
Kotlin property getter. In Java use
defaultConnection()
instead.
-