qsqlfield.sip 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // qsqlfield.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 QSqlField
  22. {
  23. %TypeHeaderCode
  24. #include <qsqlfield.h>
  25. %End
  26. public:
  27. enum RequiredStatus
  28. {
  29. Unknown,
  30. Optional,
  31. Required,
  32. };
  33. QSqlField(const QString &fieldName = QString(), QMetaType type = QMetaType(), const QString &tableName = QString());
  34. QSqlField(const QSqlField &other);
  35. bool operator==(const QSqlField &other) const;
  36. bool operator!=(const QSqlField &other) const;
  37. ~QSqlField();
  38. void setValue(const QVariant &value);
  39. QVariant value() const;
  40. void setName(const QString &name);
  41. QString name() const;
  42. bool isNull() const;
  43. void setReadOnly(bool readOnly);
  44. bool isReadOnly() const;
  45. void clear();
  46. bool isAutoValue() const;
  47. void setRequiredStatus(QSqlField::RequiredStatus status);
  48. void setRequired(bool required);
  49. void setLength(int fieldLength);
  50. void setPrecision(int precision);
  51. void setDefaultValue(const QVariant &value);
  52. void setSqlType(int type);
  53. void setGenerated(bool gen);
  54. void setAutoValue(bool autoVal);
  55. QSqlField::RequiredStatus requiredStatus() const;
  56. int length() const;
  57. int precision() const;
  58. QVariant defaultValue() const;
  59. int typeID() const;
  60. bool isGenerated() const;
  61. bool isValid() const;
  62. void setTableName(const QString &tableName);
  63. QString tableName() const;
  64. QMetaType metaType() const;
  65. void setMetaType(QMetaType type);
  66. %If (Qt_6_6_0 -)
  67. void swap(QSqlField &other /Constrained/);
  68. %End
  69. };