Qore SqlUtil Module Reference 1.9
Loading...
Searching...
No Matches
AbstractNumericDataType.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
25// assume local scope for variables, do not use "$" signs
26// require type definitions everywhere
28// enable all warnings
29
31namespace SqlUtil {
33
36class AbstractNumericDataType : public DataProvider::QoreNumberDataTypeBase {
37
38public:
39protected:
41 string name;
42
43public:
44
46 constructor(string native_type, bool nullable, *hash<auto> options)
47 : QoreNumberDataTypeBase(nullable ? SoftNumberOrNothingType : SoftNumberType,
48 options + {"qore.no_null": True}) {
49 name = native_type;
50 // make sure compatible values are otherwise passed straight through without conversions; we let the DB do
51 // conversions for performance reasons
52 base_type_hash += {
53 NT_INT: True,
54 NT_FLOAT: True,
55 NT_STRING: True,
56 };
57 if (or_nothing_type);
58
59 }
60
62 string getName();
63
64
66
70 auto acceptsValue(auto value);
71
72};
73};
the data type for Oracle NUMBER columns
Definition: AbstractNumericDataType.qc.dox.h:36
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
string getName()
returns the type name
constructor(string native_type, bool nullable, *hash< auto > options)
creates the object
Definition: AbstractNumericDataType.qc.dox.h:46
string name
the type name
Definition: AbstractNumericDataType.qc.dox.h:41
Qore AbstractDatabase class definition.
Definition: AbstractDatabase.qc.dox.h:26