/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtSql.h"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qsqlquery.sip"
#include <qsqlquery.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"

#line 37 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qsqldatabase.sip"
#include <qsqldatabase.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qsqlresult.sip"
#include <qsqlresult.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qtsqlglobal.sip"
#include <qtsqlglobal.h>
#line 45 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 48 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 51 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 54 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qanystringview.sip"
#include <qanystringview.h>
#line 57 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qsqlrecord.sip"
#include <qsqlrecord.h>
#line 60 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qsqldriver.sip"
#include <qsqldriver.h>
#line 63 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSql/qsqlerror.sip"
#include <qsqlerror.h>
#line 66 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSql/sipQtSqlQSqlQuery.cpp"


PyDoc_STRVAR(doc_QSqlQuery_isValid, "isValid(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_isValid(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_isValid, doc_QSqlQuery_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_isActive, "isActive(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_isActive(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_isActive(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isActive();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_isActive, doc_QSqlQuery_isActive);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_isNull, "isNull(self, field: int) -> bool\n"
"isNull(self, name: QByteArray|bytes|bytearray|memoryview|str|None) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_isNull(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_isNull(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->isNull(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    {
        ::QAnyStringView* a0;
        int a0State = 0;
        void *a0UserState = SIP_NULLPTR;
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QAnyStringView, &a0, &a0State, &a0UserState))
        {
            bool sipRes;

            sipRes = sipCpp->isNull(*a0);
            sipReleaseTypeUS(a0, sipType_QAnyStringView, a0State, a0UserState);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_isNull, doc_QSqlQuery_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_at, "at(self) -> int");

extern "C" {static PyObject *meth_QSqlQuery_at(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_at(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->at();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_at, doc_QSqlQuery_at);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_lastQuery, "lastQuery(self) -> str");

extern "C" {static PyObject *meth_QSqlQuery_lastQuery(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_lastQuery(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->lastQuery());

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_lastQuery, doc_QSqlQuery_lastQuery);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_numRowsAffected, "numRowsAffected(self) -> int");

extern "C" {static PyObject *meth_QSqlQuery_numRowsAffected(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_numRowsAffected(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->numRowsAffected();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_numRowsAffected, doc_QSqlQuery_numRowsAffected);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_lastError, "lastError(self) -> QSqlError");

extern "C" {static PyObject *meth_QSqlQuery_lastError(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_lastError(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QSqlError*sipRes;

            sipRes = new ::QSqlError(sipCpp->lastError());

            return sipConvertFromNewType(sipRes, sipType_QSqlError, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_lastError, doc_QSqlQuery_lastError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_isSelect, "isSelect(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_isSelect(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_isSelect(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isSelect();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_isSelect, doc_QSqlQuery_isSelect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_size, "size(self) -> int");

extern "C" {static PyObject *meth_QSqlQuery_size(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_size(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->size();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_size, doc_QSqlQuery_size);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_driver, "driver(self) -> QSqlDriver|None");

extern "C" {static PyObject *meth_QSqlQuery_driver(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_driver(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            const ::QSqlDriver*sipRes;

            sipRes = sipCpp->driver();

            return sipConvertFromType(const_cast< ::QSqlDriver *>(sipRes), sipType_QSqlDriver, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_driver, doc_QSqlQuery_driver);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_result, "result(self) -> QSqlResult|None");

extern "C" {static PyObject *meth_QSqlQuery_result(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_result(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            const ::QSqlResult*sipRes;

            sipRes = sipCpp->result();

            return sipConvertFromType(const_cast< ::QSqlResult *>(sipRes), sipType_QSqlResult, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_result, doc_QSqlQuery_result);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_isForwardOnly, "isForwardOnly(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_isForwardOnly(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_isForwardOnly(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isForwardOnly();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_isForwardOnly, doc_QSqlQuery_isForwardOnly);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_record, "record(self) -> QSqlRecord");

extern "C" {static PyObject *meth_QSqlQuery_record(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_record(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QSqlRecord*sipRes;

            sipRes = new ::QSqlRecord(sipCpp->record());

            return sipConvertFromNewType(sipRes, sipType_QSqlRecord, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_record, doc_QSqlQuery_record);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_setForwardOnly, "setForwardOnly(self, forward: bool)");

extern "C" {static PyObject *meth_QSqlQuery_setForwardOnly(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_setForwardOnly(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0))
        {
            sipCpp->setForwardOnly(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_setForwardOnly, doc_QSqlQuery_setForwardOnly);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_exec, "exec(self, query: str|None) -> bool\n"
"exec(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_exec(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_exec(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QString* a0;
        int a0State = 0;
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QString, &a0, &a0State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->exec(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->exec();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_exec, doc_QSqlQuery_exec);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_value, "value(self, i: int) -> Any\n"
"value(self, name: QByteArray|bytes|bytearray|memoryview|str|None) -> Any");

extern "C" {static PyObject *meth_QSqlQuery_value(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_value(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->value(a0));

            return sipConvertFromNewType(sipRes, sipType_QVariant, SIP_NULLPTR);
        }
    }

    {
        ::QAnyStringView* a0;
        int a0State = 0;
        void *a0UserState = SIP_NULLPTR;
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QAnyStringView, &a0, &a0State, &a0UserState))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->value(*a0));
            sipReleaseTypeUS(a0, sipType_QAnyStringView, a0State, a0UserState);

            return sipConvertFromNewType(sipRes, sipType_QVariant, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_value, doc_QSqlQuery_value);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_seek, "seek(self, index: int, relative: bool = False) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_seek(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_seek(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        bool a1 = 0;
        ::QSqlQuery *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_relative,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi|b", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0, &a1))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->seek(a0, a1);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_seek, doc_QSqlQuery_seek);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_next, "next(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_next(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_next(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->next();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_next, doc_QSqlQuery_next);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_previous, "previous(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_previous(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_previous(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->previous();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_previous, doc_QSqlQuery_previous);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_first, "first(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_first(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_first(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->first();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_first, doc_QSqlQuery_first);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_last, "last(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_last(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_last(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->last();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_last, doc_QSqlQuery_last);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_clear, "clear(self)");

extern "C" {static PyObject *meth_QSqlQuery_clear(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_clear(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->clear();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_clear, doc_QSqlQuery_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_execBatch, "execBatch(self, mode: QSqlQuery.BatchExecutionMode = QSqlQuery.ValuesAsRows) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_execBatch(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_execBatch(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery::BatchExecutionMode a0 = QSqlQuery::ValuesAsRows;
        ::QSqlQuery *sipCpp;

        static const char *sipKwdList[] = {
            sipName_mode,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|E", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QSqlQuery_BatchExecutionMode, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->execBatch(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_execBatch, doc_QSqlQuery_execBatch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_prepare, "prepare(self, query: str|None) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_prepare(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_prepare(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QString* a0;
        int a0State = 0;
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QString, &a0, &a0State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->prepare(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_prepare, doc_QSqlQuery_prepare);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_bindValue, "bindValue(self, placeholder: str|None, val: Any, type: QSql.ParamTypeFlag = QSql.In)\n"
"bindValue(self, pos: int, val: Any, type: QSql.ParamTypeFlag = QSql.In)");

extern "C" {static PyObject *meth_QSqlQuery_bindValue(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_bindValue(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QString* a0;
        int a0State = 0;
        const ::QVariant* a1;
        int a1State = 0;
        ::QSql::ParamType a2def = QSql::In;
        ::QSql::ParamType* a2 = &a2def;
        int a2State = 0;
        ::QSqlQuery *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_type,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J1|J1", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QString, &a0, &a0State, sipType_QVariant, &a1, &a1State, sipType_QFlags_0100QSql_ParamTypeFlag, &a2, &a2State))
        {
            sipCpp->bindValue(*a0, *a1, *a2);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(const_cast< ::QVariant *>(a1), sipType_QVariant, a1State);
            sipReleaseType(a2, sipType_QFlags_0100QSql_ParamTypeFlag, a2State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        int a0;
        const ::QVariant* a1;
        int a1State = 0;
        ::QSql::ParamType a2def = QSql::In;
        ::QSql::ParamType* a2 = &a2def;
        int a2State = 0;
        ::QSqlQuery *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_type,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiJ1|J1", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0, sipType_QVariant, &a1, &a1State, sipType_QFlags_0100QSql_ParamTypeFlag, &a2, &a2State))
        {
            sipCpp->bindValue(a0, *a1, *a2);
            sipReleaseType(const_cast< ::QVariant *>(a1), sipType_QVariant, a1State);
            sipReleaseType(a2, sipType_QFlags_0100QSql_ParamTypeFlag, a2State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_bindValue, doc_QSqlQuery_bindValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_addBindValue, "addBindValue(self, val: Any, type: QSql.ParamTypeFlag = QSql.In)");

extern "C" {static PyObject *meth_QSqlQuery_addBindValue(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_addBindValue(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QVariant* a0;
        int a0State = 0;
        ::QSql::ParamType a1def = QSql::In;
        ::QSql::ParamType* a1 = &a1def;
        int a1State = 0;
        ::QSqlQuery *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_type,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QVariant, &a0, &a0State, sipType_QFlags_0100QSql_ParamTypeFlag, &a1, &a1State))
        {
            sipCpp->addBindValue(*a0, *a1);
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);
            sipReleaseType(a1, sipType_QFlags_0100QSql_ParamTypeFlag, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_addBindValue, doc_QSqlQuery_addBindValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_boundValue, "boundValue(self, placeholder: str|None) -> Any\n"
"boundValue(self, pos: int) -> Any");

extern "C" {static PyObject *meth_QSqlQuery_boundValue(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_boundValue(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QString* a0;
        int a0State = 0;
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QString, &a0, &a0State))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->boundValue(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes, sipType_QVariant, SIP_NULLPTR);
        }
    }

    {
        int a0;
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->boundValue(a0));

            return sipConvertFromNewType(sipRes, sipType_QVariant, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_boundValue, doc_QSqlQuery_boundValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_boundValues, "boundValues(self) -> list[Any]");

extern "C" {static PyObject *meth_QSqlQuery_boundValues(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_boundValues(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QVariantList*sipRes;

            sipRes = new ::QVariantList(sipCpp->boundValues());

            return sipConvertFromNewType(sipRes, sipType_QList_0100QVariant, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_boundValues, doc_QSqlQuery_boundValues);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_executedQuery, "executedQuery(self) -> str");

extern "C" {static PyObject *meth_QSqlQuery_executedQuery(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_executedQuery(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->executedQuery());

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_executedQuery, doc_QSqlQuery_executedQuery);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_lastInsertId, "lastInsertId(self) -> Any");

extern "C" {static PyObject *meth_QSqlQuery_lastInsertId(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_lastInsertId(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->lastInsertId());

            return sipConvertFromNewType(sipRes, sipType_QVariant, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_lastInsertId, doc_QSqlQuery_lastInsertId);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_setNumericalPrecisionPolicy, "setNumericalPrecisionPolicy(self, precisionPolicy: QSql.NumericalPrecisionPolicy)");

extern "C" {static PyObject *meth_QSqlQuery_setNumericalPrecisionPolicy(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_setNumericalPrecisionPolicy(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSql::NumericalPrecisionPolicy a0;
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QSql_NumericalPrecisionPolicy, &a0))
        {
            sipCpp->setNumericalPrecisionPolicy(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_setNumericalPrecisionPolicy, doc_QSqlQuery_setNumericalPrecisionPolicy);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_numericalPrecisionPolicy, "numericalPrecisionPolicy(self) -> QSql.NumericalPrecisionPolicy");

extern "C" {static PyObject *meth_QSqlQuery_numericalPrecisionPolicy(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_numericalPrecisionPolicy(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QSql::NumericalPrecisionPolicy sipRes;

            sipRes = sipCpp->numericalPrecisionPolicy();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QSql_NumericalPrecisionPolicy);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_numericalPrecisionPolicy, doc_QSqlQuery_numericalPrecisionPolicy);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_finish, "finish(self)");

extern "C" {static PyObject *meth_QSqlQuery_finish(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_finish(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            sipCpp->finish();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_finish, doc_QSqlQuery_finish);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_nextResult, "nextResult(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_nextResult(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_nextResult(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->nextResult();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_nextResult, doc_QSqlQuery_nextResult);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_swap, "swap(self, other: QSqlQuery)");

extern "C" {static PyObject *meth_QSqlQuery_swap(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_swap(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSqlQuery* a0;
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QSqlQuery, &sipCpp, sipType_QSqlQuery, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_swap, doc_QSqlQuery_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_boundValueNames, "boundValueNames(self) -> list[str]");

extern "C" {static PyObject *meth_QSqlQuery_boundValueNames(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_boundValueNames(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            ::QStringList*sipRes;

            sipRes = new ::QStringList(sipCpp->boundValueNames());

            return sipConvertFromNewType(sipRes, sipType_QStringList, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_boundValueNames, doc_QSqlQuery_boundValueNames);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_boundValueName, "boundValueName(self, pos: int) -> str");

extern "C" {static PyObject *meth_QSqlQuery_boundValueName(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_boundValueName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->boundValueName(a0));

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_boundValueName, doc_QSqlQuery_boundValueName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_setPositionalBindingEnabled, "setPositionalBindingEnabled(self, enable: bool)");

extern "C" {static PyObject *meth_QSqlQuery_setPositionalBindingEnabled(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_setPositionalBindingEnabled(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
        ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSqlQuery, &sipCpp, &a0))
        {
            sipCpp->setPositionalBindingEnabled(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_setPositionalBindingEnabled, doc_QSqlQuery_setPositionalBindingEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlQuery_isPositionalBindingEnabled, "isPositionalBindingEnabled(self) -> bool");

extern "C" {static PyObject *meth_QSqlQuery_isPositionalBindingEnabled(PyObject *, PyObject *);}
static PyObject *meth_QSqlQuery_isPositionalBindingEnabled(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSqlQuery *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlQuery, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isPositionalBindingEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlQuery, sipName_isPositionalBindingEnabled, doc_QSqlQuery_isPositionalBindingEnabled);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QSqlQuery(void *, int);}
static void release_QSqlQuery(void *sipCppV, int)
{
    delete reinterpret_cast< ::QSqlQuery *>(sipCppV);
}


extern "C" {static void *array_QSqlQuery(Py_ssize_t);}
static void *array_QSqlQuery(Py_ssize_t sipNrElem)
{
    return new ::QSqlQuery[sipNrElem];
}


extern "C" {static void array_delete_QSqlQuery(void *);}
static void array_delete_QSqlQuery(void *sipCpp)
{
    delete[] reinterpret_cast< ::QSqlQuery *>(sipCpp);
}


extern "C" {static void assign_QSqlQuery(void *, Py_ssize_t, void *);}
static void assign_QSqlQuery(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QSqlQuery *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QSqlQuery *>(sipSrc);
}


extern "C" {static void *copy_QSqlQuery(const void *, Py_ssize_t);}
static void *copy_QSqlQuery(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::QSqlQuery(reinterpret_cast<const ::QSqlQuery *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_QSqlQuery(sipSimpleWrapper *);}
static void dealloc_QSqlQuery(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSqlQuery(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QSqlQuery(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QSqlQuery(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::QSqlQuery *sipCpp = SIP_NULLPTR;

    {
        const ::QSqlDatabase* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QSqlDatabase, &a0))
        {
            sipCpp = new ::QSqlQuery(*a0);

            return sipCpp;
        }
    }

    {
        const ::QString& a0def = QString();
        const ::QString* a0 = &a0def;
        int a0State = 0;
        const ::QSqlDatabase& a1def = QSqlDatabase();
        const ::QSqlDatabase* a1 = &a1def;

        static const char *sipKwdList[] = {
            sipName_query,
            sipName_db,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1J9", sipType_QString, &a0, &a0State, sipType_QSqlDatabase, &a1))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::QSqlQuery(*a0, *a1);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipCpp;
        }
    }

    {
        ::QSqlResult* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J8", sipType_QSqlResult, &a0))
        {
            sipCpp = new ::QSqlQuery(a0);

            return sipCpp;
        }
    }

    {
        const ::QSqlQuery* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QSqlQuery, &a0))
        {
            sipCpp = new ::QSqlQuery(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QSqlQuery[] = {
    {sipName_addBindValue, SIP_MLMETH_CAST(meth_QSqlQuery_addBindValue), METH_VARARGS|METH_KEYWORDS, doc_QSqlQuery_addBindValue},
    {sipName_at, meth_QSqlQuery_at, METH_VARARGS, doc_QSqlQuery_at},
    {sipName_bindValue, SIP_MLMETH_CAST(meth_QSqlQuery_bindValue), METH_VARARGS|METH_KEYWORDS, doc_QSqlQuery_bindValue},
    {sipName_boundValue, meth_QSqlQuery_boundValue, METH_VARARGS, doc_QSqlQuery_boundValue},
    {sipName_boundValueName, meth_QSqlQuery_boundValueName, METH_VARARGS, doc_QSqlQuery_boundValueName},
    {sipName_boundValueNames, meth_QSqlQuery_boundValueNames, METH_VARARGS, doc_QSqlQuery_boundValueNames},
    {sipName_boundValues, meth_QSqlQuery_boundValues, METH_VARARGS, doc_QSqlQuery_boundValues},
    {sipName_clear, meth_QSqlQuery_clear, METH_VARARGS, doc_QSqlQuery_clear},
    {sipName_driver, meth_QSqlQuery_driver, METH_VARARGS, doc_QSqlQuery_driver},
    {sipName_exec, meth_QSqlQuery_exec, METH_VARARGS, doc_QSqlQuery_exec},
    {sipName_execBatch, SIP_MLMETH_CAST(meth_QSqlQuery_execBatch), METH_VARARGS|METH_KEYWORDS, doc_QSqlQuery_execBatch},
    {sipName_executedQuery, meth_QSqlQuery_executedQuery, METH_VARARGS, doc_QSqlQuery_executedQuery},
    {sipName_finish, meth_QSqlQuery_finish, METH_VARARGS, doc_QSqlQuery_finish},
    {sipName_first, meth_QSqlQuery_first, METH_VARARGS, doc_QSqlQuery_first},
    {sipName_isActive, meth_QSqlQuery_isActive, METH_VARARGS, doc_QSqlQuery_isActive},
    {sipName_isForwardOnly, meth_QSqlQuery_isForwardOnly, METH_VARARGS, doc_QSqlQuery_isForwardOnly},
    {sipName_isNull, meth_QSqlQuery_isNull, METH_VARARGS, doc_QSqlQuery_isNull},
    {sipName_isPositionalBindingEnabled, meth_QSqlQuery_isPositionalBindingEnabled, METH_VARARGS, doc_QSqlQuery_isPositionalBindingEnabled},
    {sipName_isSelect, meth_QSqlQuery_isSelect, METH_VARARGS, doc_QSqlQuery_isSelect},
    {sipName_isValid, meth_QSqlQuery_isValid, METH_VARARGS, doc_QSqlQuery_isValid},
    {sipName_last, meth_QSqlQuery_last, METH_VARARGS, doc_QSqlQuery_last},
    {sipName_lastError, meth_QSqlQuery_lastError, METH_VARARGS, doc_QSqlQuery_lastError},
    {sipName_lastInsertId, meth_QSqlQuery_lastInsertId, METH_VARARGS, doc_QSqlQuery_lastInsertId},
    {sipName_lastQuery, meth_QSqlQuery_lastQuery, METH_VARARGS, doc_QSqlQuery_lastQuery},
    {sipName_next, meth_QSqlQuery_next, METH_VARARGS, doc_QSqlQuery_next},
    {sipName_nextResult, meth_QSqlQuery_nextResult, METH_VARARGS, doc_QSqlQuery_nextResult},
    {sipName_numRowsAffected, meth_QSqlQuery_numRowsAffected, METH_VARARGS, doc_QSqlQuery_numRowsAffected},
    {sipName_numericalPrecisionPolicy, meth_QSqlQuery_numericalPrecisionPolicy, METH_VARARGS, doc_QSqlQuery_numericalPrecisionPolicy},
    {sipName_prepare, meth_QSqlQuery_prepare, METH_VARARGS, doc_QSqlQuery_prepare},
    {sipName_previous, meth_QSqlQuery_previous, METH_VARARGS, doc_QSqlQuery_previous},
    {sipName_record, meth_QSqlQuery_record, METH_VARARGS, doc_QSqlQuery_record},
    {sipName_result, meth_QSqlQuery_result, METH_VARARGS, doc_QSqlQuery_result},
    {sipName_seek, SIP_MLMETH_CAST(meth_QSqlQuery_seek), METH_VARARGS|METH_KEYWORDS, doc_QSqlQuery_seek},
    {sipName_setForwardOnly, meth_QSqlQuery_setForwardOnly, METH_VARARGS, doc_QSqlQuery_setForwardOnly},
    {sipName_setNumericalPrecisionPolicy, meth_QSqlQuery_setNumericalPrecisionPolicy, METH_VARARGS, doc_QSqlQuery_setNumericalPrecisionPolicy},
    {sipName_setPositionalBindingEnabled, meth_QSqlQuery_setPositionalBindingEnabled, METH_VARARGS, doc_QSqlQuery_setPositionalBindingEnabled},
    {sipName_size, meth_QSqlQuery_size, METH_VARARGS, doc_QSqlQuery_size},
    {sipName_swap, meth_QSqlQuery_swap, METH_VARARGS, doc_QSqlQuery_swap},
    {sipName_value, meth_QSqlQuery_value, METH_VARARGS, doc_QSqlQuery_value}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QSqlQuery[] = {
    {sipName_ValuesAsRows, static_cast<int>(::QSqlQuery::ValuesAsRows)},
    {sipName_ValuesAsColumns, static_cast<int>(::QSqlQuery::ValuesAsColumns)},
    {0, 0}
};

PyDoc_STRVAR(doc_QSqlQuery, "\1QSqlQuery(db: QSqlDatabase)\n"
"QSqlQuery(query: str|None = '', db: QSqlDatabase = QSqlDatabase())\n"
"QSqlQuery(r: QSqlResult|None)\n"
"QSqlQuery(other: QSqlQuery)");


sipClassTypeDef sipTypeDef_QtSql_QSqlQuery = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSqlQuery,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QSqlQuery,
        {0, 0, 1},
        39, methods_QSqlQuery,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QSqlQuery, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSqlQuery,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QSqlQuery,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSqlQuery,
    assign_QSqlQuery,
    array_QSqlQuery,
    copy_QSqlQuery,
    release_QSqlQuery,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSqlQuery,
    sizeof (::QSqlQuery),
};
