CONZEPT 16 C++ API
|
Execution of a procedure. More...
#include "C16/Procedure.hpp"
Execution of a procedure.
Classes | |
class | Exception |
Exception of the execution of a procedure. More... | |
Static Public Attributes | |
static const int | ARGUMENT_COUNT_LIMIT = 64 |
Argument count limit. More... | |
Public Member Functions | |
Execution (const Database &database, const std::string &procedure_name, const std::string &function_name) | |
Constructs an execution of procedure. More... | |
Execution (const Database &database, const std::string &function_name) | |
Constructs an execution of procedure. More... | |
template<typename ... Arguments> | |
void | arguments_add (Arguments &&... arguments) |
Adds multiple arguments to the execution. More... | |
const Variant & | execute () |
Executes the execution. More... | |
const Variant & | execute_error_throw () |
Executes the execution and throws an exception if the execution has an error. More... | |
const Variant & | result () const |
Gets the result of the execution. More... | |
const Error & | error () const |
Gets the error of the execution. More... | |
void | error_throw () const |
Throws an exception if the execution has an error. More... | |
void | reset () |
Resets the execution. More... | |
void | argument_add_value (const Value::Alpha &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (Value::Alpha::const_pointer argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Logic &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Byte &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Word &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Int &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Bigint &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Float &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Decimal &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Date &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_value (const Value::Time &argument) |
Adds a single argument to the execution which is passed by value. More... | |
void | argument_add_reference (Value::Alpha &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Logic &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Byte &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Word &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Int &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Bigint &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Float &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Decimal &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Date &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
void | argument_add_reference (Value::Time &argument) |
Adds a single argument to the execution which is passed by reference. More... | |
|
strong |
Error of the execution of a procedure.
Enumerator | |
---|---|
STACK_OVERFLOW | Stack overflow occurred. |
PROCEDURE_CODE_INEXISTENT | Procedure code inexistent. |
PROCEDURE_CODE_INCOMPATIBLE | Procedure code incompatible. |
MEMORY_EXHAUSTED | Memory exhausted. |
PROCEDURE_CALL_OLD | Old procedure (A-) called. |
PROCEDURE_INEXISTENT | Procedure inexistent. |
DATA_AREA_INEXISTENT | Data area inexistent. |
DATA_AREA_DIFFERENT | Data area different. |
DATA_AREA_NOT_INSTANCED | Data area not instanced. |
FUNCTION_INEXISTENT | Function inexistent. |
ARGUMENTS_DIFFERENT | Arguments different. |
FIELD_INEXISTENT | Field inexistent. |
TYPE_DIFFERENT | Type different. |
ARRAY_INDEX_INVALID | Array index invalid. |
VALUE_OVERFLOW | Value overflow occurred. |
STRING_LENGTH_EXCEEDED | String length exceeded. |
DIVISION_BY_ZERO | Division by zero occurred. |
VALUE_OUT_OF_DOMAIN | Value out of domain. |
VALUE_OUT_OF_RANGE | Value out of range. |
TABLE_INEXISTENT | Table inexistent. |
SUBRECORD_INEXISTENT | Subrecord inexistent. |
KEY_INEXISTENT | Key inexistent. |
LINK_INEXISTENT | Link inexistent. |
VALUE_INVALID | Value invalid. |
KEY_FIELD_INEXISTENT | Key field inexistent. |
LINK_FIELD_INEXISTENT | Link field inexistent. |
HANDLE_INVALID | Handle invalid. |
ARGUMENT_MISSING | Argument missing. |
LINK_INVALID | Link valid. |
TABLE_INVALID | Table invalid. |
SELECTIONS_HAVE_VALUE_SET | Selections have value set. |
SELECTIONS_SORT_DIFFERENT | Sort of selections different. |
SELECTIONS_IDENTICAL | Selections idenctical. |
PROPERTY_INVALID | Property invalid. |
DECIMAL_ARITHMETIC_FAILED | Decimal arithmetic failed. |
CONVERSION_FAILED | Conversion failed. |
FRAME_DIFFERENT | Frame different. |
FRAME_INEXISTENT | Frame inexistent. |
OPERATION_ILLEGAL | Operation illegal. |
DEADLOCK | Deadlock occurred. |
|
static |
Argument count limit.
C16::Procedure::Execution::Execution | ( | const Database & | database, |
const std::string & | procedure_name, | ||
const std::string & | function_name | ||
) |
C16::Procedure::Execution::Execution | ( | const Database & | database, |
const std::string & | function_name | ||
) |
Constructs an execution of procedure.
database | Database the execution relates to |
function_name | Name of the function |
The name of the function is of the form <procedure_name>
[ :<name>
], where the parts in angle brackets (<
... >
) contain the following data:
<procedure_name>
– Name of the procedure.<name>
– Name of the function of the procedure.Fragments in square brackets ([ ... ]) may be ommitted.
void C16::Procedure::Execution::argument_add_value | ( | const Value::Alpha & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | Value::Alpha::const_pointer | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Logic & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Byte & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Word & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Int & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Bigint & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Float & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Decimal & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Date & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_value | ( | const Value::Time & | argument | ) |
Adds a single argument to the execution which is passed by value.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Alpha & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Logic & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Byte & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Word & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Int & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Bigint & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Float & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Decimal & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Date & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
void C16::Procedure::Execution::argument_add_reference | ( | Value::Time & | argument | ) |
Adds a single argument to the execution which is passed by reference.
argument | Argument |
|
inline |
Adds multiple arguments to the execution.
arguments | Arguments |
Referenced by C16::Procedures::execute(), and C16::Procedure::execute().
const Variant& C16::Procedure::Execution::execute | ( | ) |
Executes the execution.
const Variant& C16::Procedure::Execution::execute_error_throw | ( | ) |
Executes the execution and throws an exception if the execution has an error.
Referenced by C16::Procedures::execute(), and C16::Procedure::execute().
const Variant& C16::Procedure::Execution::result | ( | ) | const |
Gets the result of the execution.
The result is the return value of the executed function.
const Error& C16::Procedure::Execution::error | ( | ) | const |
Gets the error of the execution.
void C16::Procedure::Execution::error_throw | ( | ) | const |