Qore DataProvider Module Reference  2.5
DataProvider::ListDataType Class Reference

describes a data type based on a hash More...

Inheritance diagram for DataProvider::ListDataType:

Public Member Functions

auto acceptsValue (auto value)
 returns the value if the value can be assigned to the type More...
 
 constructor (AbstractDataProviderType element_type, bool or_nothing=False, *hash< auto > options, *hash< auto > tags)
 creates the object
 
 constructor (Type element_type, bool or_nothing=False, *hash< auto > options, *hash< auto > tags)
 creates the object
 
hash< string, bool > getAcceptTypeHash ()
 returns a hash of base types accepted by this type; keys are type names
 
string getDesc ()
 Returns the description.
 
*AbstractDataProviderType getElementType ()
 returns the subtype (for lists or hashes) if there is only one
 
*hash< string, AbstractDataFieldgetFields ()
 returns the fields of the data structure; if any
 
string getName ()
 returns the type name
 
hash< string, bool > getReturnTypeHash ()
 returns a hash of base types returned by this type; keys are type names
 
*Type getValueType ()
 returns the base type for the type, if any
 
- Public Member Functions inherited from DataProvider::AbstractDataProviderType
 constructor ()
 creates the type
 
 constructor (hash< auto > options, *hash< auto > tags)
 creates the type and sets options More...
 
int getBaseTypeCode ()
 Returns the base type code for the type.
 
string getBaseTypeName ()
 Returns the base type name for the type; must be a standard Qore base type name.
 
string getDesc ()
 Returns the description.
 
*hash< string, bool > getDirectTypeHash ()
 Returns a hash of native base type code keys where no translations are performed; keys are type codes, not names.
 
*AbstractDataField getField (string field_name)
 Returns the given field, if present, or NOTHING if not.
 
*hash< string, hash< DataFieldInfo > > getFieldInfo ()
 Returns information on fields supported.
 
*AbstractDataProviderType getFieldType (string field_name)
 get the given field type if it exists, otherwise return NOTHING
 
hash< DataTypeInfogetInfo ()
 Returns a description of the type as a hash.
 
hash< DataTypeInfogetInputInfo ()
 Returns a description of the type as an input type. More...
 
*hash< auto > getOptions ()
 Returns options set on the type.
 
auto getOptionValue (string opt)
 Returns the value of the given option.
 
AbstractDataProviderType getOrNothingType ()
 Returns an "or nothing" type equivalent to the current type. More...
 
AbstractDataProviderType getSoftType ()
 Returns a "soft" type equivalent to the current type. More...
 
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions ()
 Returns supported options.
 
auto getTag (string tag)
 Returns the value of the given tag.
 
*hash< auto > getTags ()
 Returns tags set on the type.
 
bool hasType ()
 Returns True if the type is not a wildcard type.
 
bool isAssignableFrom (AbstractDataProviderType t)
 Returns True if this type can be assigned from values of the argument type.
 
bool isAssignableFrom (Type t)
 Returns True if this type can be assigned from values of the argument type.
 
bool isList ()
 Returns True if this type is a list.
 
bool isMandatory ()
 Returns True if the type must have a value.
 
bool isOrNothingType ()
 Returns True if the type also accepts NOTHING.
 
 setOption (string opt, auto value)
 sets the given option on the type More...
 
 setOptions (hash< auto > options)
 sets options on the type More...
 

Protected Member Functions

 init (AbstractDataProviderType element_type, bool or_nothing)
 common constructor initialization
 
- Protected Member Functions inherited from DataProvider::AbstractDataProviderType
 setOptionIntern (string opt, auto value)
 sets the given option without any validation of the option
 

Protected Attributes

*hash< string, bool > accept_type_hash
 hash of base types accepted by this type; keys are type names
 
AbstractDataProviderType element_type
 element type
 
string name
 the name of the type
 
*hash< string, bool > return_type_hash
 hash of base types returned by this type; keys are type names
 
- Protected Attributes inherited from DataProvider::AbstractDataProviderType
hash< auto > options
 type options
 
*hash< auto > tags
 type tags
 

Additional Inherited Members

- Static Public Member Functions inherited from DataProvider::AbstractDataProviderType
static AbstractDataProviderType get (string typename, *hash< auto > options)
 Returns an appropriate object for the given type. More...
 
static AbstractDataProviderType get (Type type, *hash< auto > options, *hash< auto > tags)
 Returns an appropriate object for the given type.
 
- Public Attributes inherited from DataProvider::AbstractDataProviderType
const DefaultDesc = "no description available"
 Default description.
 

Detailed Description

describes a data type based on a hash

Member Function Documentation

◆ acceptsValue()

auto DataProvider::ListDataType::acceptsValue ( auto  value)
virtual

returns the value if the value can be assigned to the type

Parameters
valuethe value to assign to the type
Returns
the value to be assigned; can be converted by the type
Exceptions
RUNTIME-TYPE-ERRORvalue cannot be assigned to type

Implements DataProvider::AbstractDataProviderType.

Reimplemented in DataProvider::SoftListDataType.

_qore_1_1_s_q_l_1_1_datasource_pool.html#ae3f91bf804ee55f47169b8ae9669ad40">Qore::SQL::DatasourcePool::clearWarningCallback
clearWarningCallback()
clears any connection delay warning callback from the object
Qore::SQL::DatasourcePool::getOSCharset
string getOSCharset()
Returns the Qore character encoding name for the object as a string or "(unknown)" if none is set.
Qore::SQL::DatasourcePool::destructor
destructor()
Throws an exception if any transactions are in progress and returns immediately; the object is destro...
Qore::SQL::DatasourcePool::vexec
auto vexec(string sql, *softlist< auto > vargs)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
Qore::SQL::DatasourcePool::getSQLStatement
AbstractSQLStatement getSQLStatement()
Returns an AbstractSQLStatement object based on the current database connection object.
Qore::Serializable
The Serializable class can be used to mark a class as being serializable.
Definition: QC_Serializable.dox.h:96
Qore::Thread::Queue
Queue objects provide a blocking, thread-safe message-passing object to Qore programs
Definition: QC_Queue.dox.h:22
Qore::max
auto max(list< auto > l)
Returns the maximum value in a list.
Qore::min
auto min(list< auto > l)
Returns the minumum value in a list.
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3