qsqlresult.sip 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // qsqlresult.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtSql Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QSqlResult /Supertype=PyQt6.sip.wrapper/
  22. {
  23. %TypeHeaderCode
  24. #include <qsqlresult.h>
  25. %End
  26. public:
  27. virtual ~QSqlResult();
  28. virtual QVariant handle() const;
  29. protected:
  30. enum BindingSyntax
  31. {
  32. PositionalBinding,
  33. NamedBinding,
  34. };
  35. explicit QSqlResult(const QSqlDriver *db);
  36. int at() const;
  37. QString lastQuery() const;
  38. QSqlError lastError() const;
  39. bool isValid() const;
  40. bool isActive() const;
  41. bool isSelect() const;
  42. bool isForwardOnly() const;
  43. const QSqlDriver *driver() const;
  44. virtual void setAt(int at);
  45. virtual void setActive(bool a);
  46. virtual void setLastError(const QSqlError &e);
  47. virtual void setQuery(const QString &query);
  48. virtual void setSelect(bool s);
  49. virtual void setForwardOnly(bool forward);
  50. virtual bool exec() /ReleaseGIL/;
  51. virtual bool prepare(const QString &query) /ReleaseGIL/;
  52. virtual bool savePrepare(const QString &sqlquery);
  53. virtual void bindValue(int pos, const QVariant &val, QSql::ParamType type);
  54. virtual void bindValue(const QString &placeholder, const QVariant &val, QSql::ParamType type);
  55. void addBindValue(const QVariant &val, QSql::ParamType type);
  56. QVariant boundValue(const QString &placeholder) const;
  57. QVariant boundValue(int pos) const;
  58. QSql::ParamType bindValueType(const QString &placeholder) const;
  59. QSql::ParamType bindValueType(int pos) const;
  60. int boundValueCount() const;
  61. %If (Qt_6_6_0 -)
  62. QVariantList boundValues() const [QVariantList (Qt::Disambiguated_t = Qt::Disambiguated)];
  63. %MethodCode
  64. #if defined(SIP_PROTECTED_IS_PUBLIC)
  65. sipRes = new ::QVariantList(sipCpp->boundValues());
  66. #else
  67. sipRes = new ::QVariantList(sipCpp->sipProtect_boundValues(Qt::Disambiguated));
  68. #endif
  69. %End
  70. %End
  71. %If (- Qt_6_6_0)
  72. QList<QVariant> &boundValues() const;
  73. %End
  74. QString executedQuery() const;
  75. QString boundValueName(int pos) const;
  76. void clear();
  77. bool hasOutValues() const;
  78. QSqlResult::BindingSyntax bindingSyntax() const;
  79. virtual QVariant data(int i) = 0;
  80. virtual bool isNull(int i) = 0;
  81. virtual bool reset(const QString &sqlquery) = 0;
  82. virtual bool fetch(int i) = 0 /ReleaseGIL/;
  83. virtual bool fetchNext() /ReleaseGIL/;
  84. virtual bool fetchPrevious() /ReleaseGIL/;
  85. virtual bool fetchFirst() = 0 /ReleaseGIL/;
  86. virtual bool fetchLast() = 0 /ReleaseGIL/;
  87. virtual int size() = 0;
  88. virtual int numRowsAffected() = 0;
  89. virtual QSqlRecord record() const;
  90. virtual QVariant lastInsertId() const;
  91. %If (Qt_6_6_0 -)
  92. QStringList boundValueNames() const;
  93. %End
  94. %If (Qt_6_7_0 -)
  95. void setPositionalBindingEnabled(bool enable);
  96. %End
  97. %If (Qt_6_7_0 -)
  98. bool isPositionalBindingEnabled() const;
  99. %End
  100. private:
  101. QSqlResult(const QSqlResult &);
  102. };