AbstractNumericDataType.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// assume local scope for variables, do not use "$" signs
// require type definitions everywhere
// enable all warnings
namespace SqlUtil {
class AbstractNumericDataType : public DataProvider::QoreNumberDataTypeBase {
public:
protected:
string name;
public:
constructor(string native_type, bool nullable, *hash<auto> options)
: QoreNumberDataTypeBase(nullable ? SoftNumberOrNothingType : SoftNumberType,
options + {"qore.no_null": True}) {
name = native_type;
// make sure compatible values are otherwise passed straight through without conversions; we let the DB do
// conversions for performance reasons
base_type_hash += {
NT_INT: True,
NT_FLOAT: True,
NT_STRING: True,
};
if (or_nothing_type);
}
string getName();
auto acceptsValue(auto value);
};
};
SqlUtil::AbstractNumericDataType
the data type for Oracle NUMBER columns
Definition: AbstractNumericDataType.qc.dox.h:36
SqlUtil::AbstractNumericDataType::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
SqlUtil::AbstractNumericDataType::getName
string getName()
returns the type name
SqlUtil::AbstractNumericDataType::constructor
constructor(string native_type, bool nullable, *hash< auto > options)
creates the object
Definition: AbstractNumericDataType.qc.dox.h:46
SqlUtil::AbstractNumericDataType::name
string name
the type name
Definition: AbstractNumericDataType.qc.dox.h:41
True
const True
NT_INT
const NT_INT
NT_STRING
const NT_STRING
NT_FLOAT
const NT_FLOAT
SqlUtil
Qore AbstractDatabase class definition.
Definition: AbstractDatabase.qc.dox.h:26