32#ifndef _QX_IS_VALID_PRIMARY_KEY_H_
33#define _QX_IS_VALID_PRIMARY_KEY_H_
56{
static inline bool get(
const T & t) { Q_UNUSED(t);
qAssert(
false);
return false; } };
60{
static inline bool get(
const short & t) {
return (t != 0); } };
64{
static inline bool get(
const int & t) {
return (t != 0); } };
68{
static inline bool get(
const long & t) {
return (t != 0); } };
72{
static inline bool get(
const long long & t) {
return (t != 0); } };
76{
static inline bool get(
const QString & t) {
return (! t.isEmpty()); } };
80{
static inline bool get(
const QByteArray & t) {
return (! t.isEmpty()); } };
84{
static inline bool get(
const std::string & t) {
return (! t.empty()); } };
88{
static inline bool get(
const std::wstring & t) {
return (! t.empty()); } };
93 static inline bool get(
const QVariant & t)
97 return (! t.isNull() && (t.toLongLong() != 0));
bool is_valid_primary_key(const T &t)
Root namespace for all QxOrm library features.
static bool get(const QByteArray &t)
static bool get(const QString &t)
static bool get(const QVariant &t)
static bool get(const int &t)
static bool get(const long &t)
static bool get(const long long &t)
static bool get(const short &t)
static bool get(const std::string &t)
static bool get(const std::wstring &t)
qx::trait::is_valid_primary_key<T>(const T & t) : return true if t can be a valid primary key to be i...
static bool get(const T &t)