CONZEPT 16 C++ API.
More...
#include "Exception.hpp"
#include "Flags.hpp"
#include "Place.hpp"
#include "Locking.hpp"
#include "Type.hpp"
#include "Value/Native.hpp"
#include "Value/Decimal.hpp"
#include "Value/Date.hpp"
#include "Value/Time.hpp"
#include "Value/Moment.hpp"
#include "Variant.hpp"
#include "Array.hpp"
#include "Series.hpp"
#include "Server.hpp"
#include "Database.hpp"
#include "Tables.hpp"
#include "Table.hpp"
#include "Subrecords.hpp"
#include "Subrecord.hpp"
#include "Fields.hpp"
#include "Field.hpp"
#include "Keys.hpp"
#include "Key.hpp"
#include "Links.hpp"
#include "Link.hpp"
#include "Users.hpp"
#include "User.hpp"
#include "Transactions.hpp"
#include "Transaction.hpp"
#include "Records.hpp"
#include "RecordsKey.hpp"
#include "RecordsLink.hpp"
#include "Record.hpp"
#include "Texts.hpp"
#include "Text.hpp"
#include "Procedures.hpp"
#include "Procedure.hpp"
#include "Filesystem.hpp"
CONZEPT 16 C++ API.
This header contains all members of the CONZEPT 16 C++ API that can be used by applications (programming interface) and extensions (library interface).
virtual C16::Field::Collation collation() const =0
Gets the collation of the field.
void unload()
Unloads the loaded text.
@ INVALID_NAME
Invalid name.
Exception(Error error)
Constructs an exception of the execution of a procedure.
~Database()
Disconnects from and destructs the database.
@ LINE_TOO_LONG
Line too long.
@ PROCEDURE_CODE_INEXISTENT
Procedure code inexistent.
@ WRONG_OPERAND_TYPE
Wrong operand type.
Result lock(Locking locking=Locking::LOCK_EXCLUSIVE)
Applies a locking to the loaded record.
@ SOUNDEX_1
Soundex 1 collation.
static const int YEAR_EPOCH
Epoch year of dates.
Definition: Date.hpp:20
Error
Error of a filesystem.
Definition: Filesystem.hpp:17
@ DATABASE_LOCKED_BY_SERVICE
Database locked by service.
@ NAME_TOO_LONG
Name too long.
const Record & record() const override
Gets the record buffer of the field buffer.
Result read_position_key(int key_number, long int position, Locking locking=Locking::NONE, bool reverse=false)
Reads a record by means of its position dependent on a key into the record buffer.
IteratorConst operator+(difference_type offset) const
Gets an incremented iterator.
virtual void unload()=0
Unloads the loaded binary.
Result content_export_to_file(const std::string &file_path, const std::string &cipher_key=std::string()) const
Exports the content of the loaded binary object to a file.
bool operator<(const Date &other) const
Gets if the date is earlier than another date.
std::string procedure_name
Name of the procedure that caused the error.
Definition: Procedure.hpp:678
std::int32_t Int
Integer number (signed, 32 bits).
Definition: Native.hpp:24
Compression compression() const
Gets the compression of the loaded binary object.
Generic binary buffer to operate on binaries.
Definition: Binary.hpp:25
void type_set(const std::string &type)
Sets the type of the loaded binary object.
long int count() const override
Gets the count of records of the record set.
virtual bool positioning() const =0
Gets if the field is only used for positioning.
@ MISSING_THEN
Missing THEN.
double Float
Floating point number (64 bits).
Definition: Native.hpp:28
BinaryDirectory()
Constructs a binary directory buffer.
const Subrecords & subrecords() const
Gets the subrecords of the database.
void dissociate() override
Dissociates an associated text buffer from the input stream buffer.
virtual const Subrecord & subrecord() const =0
Gets the subrecord of the field.
long int count() const override
Gets the count of records of the record set.
Field of a key.
Definition: Key.hpp:174
const Value::Time & last_request_time() const
Gets the time of the last request of the loaded user to the database.
Series of elements.
Definition: Series.hpp:29
Result erase_directory(const std::string &path) const
Deletes a binary directory within the loaded binary directory.
virtual int number() const =0
Gets the number of the link.
int level() const
Gets the level of the transaction.
@ EXTENDED
Option to perform an extended diagnosis.
const std::string & name() const
Gets the name of the loaded binary.
virtual Result rename(const std::string &name)
Renames the loaded binary.
pointer operator->() const
Gets the element of the iterator.
Subrecords of a database.
Definition: Subrecords.hpp:14
const Database * database() const
Gets the database of the loaded binary.
virtual Type type() const =0
Gets the type of the field.
void argument_add_value(const Value::Alpha &argument)
Adds a single argument to the execution which is passed by value.
const Value::Date & last_request_date() const
Gets the date of the last request of the loaded user to the database.
Fields of a database.
Definition: Fields.hpp:13
Moment()
Constructs an empty moment.
@ MULTI_KEY
Operation succeeded (Non-unique key).
bool loaded() const
Gets if a record is loaded into the record buffer.
IteratorConst()
Constructs an invalid iterator.
const Value::Decimal & value_decimal_const() const
Short name alias for value<Value::Decimal>() const.
Error
Error of the connection to a database.
Definition: Database.hpp:54
virtual const Table & get(int number) const =0
Gets a table by means of its number.
int centiseconds() const
Gets the centiseconds of the moment since the last second.
Text * text()
Gets the text buffer associated with the stream, if associated.
virtual const Series< Field > & fields() const =0
Gets the fields of the key.
@ NO_LOCK
Entity not locked.
bool operator==(const Time &other) const
Gets if the time is equal to another time.
@ WRONG_ARGUMENT_TYPE
Wrong argument type.
Error error() const
Gets the error of the operation on a binary.
@ UNKNOWN_WORD
Unknown word.
const std::string & created_user() const
Gets the user who created the loaded text.
const Value::Logic & value_logic_const() const
Short name alias for value<Value::Logic>() const.
const Value::Time & modified_time() const
Gets the time of the last modification of the loaded selection.
void unload()
Unloads the loaded record.
Output stream buffer for writing texts.
Definition: Text.hpp:711
const Table & table() const
Gets the table of the selection buffer.
@ ARRAY_FLOAT
Variant holds an Array<Value::Float>.
virtual const std::string & name() const =0
Gets the name of the link.
Result test_key(int key_number, bool reverse=false) const
Tests the existence of a record by means of a key.
static const int CUSTOM_LENGTH_LIMIT
Custom property length limit.
Definition: Binary.hpp:40
virtual const C16::Field & field() const =0
Gets the field of the table of the field.
Generic record set.
Definition: Records.hpp:43
static Moment now()
Gets the current moment (UTC) of the system.
@ MISSING_OPERAND
Missing operand.
int week_year() const
Gets the year of the week (according to ISO 8601) of the date.
long int size() const
Gets the size of the database in units of kilobytes.
@ LF
Line feed (ASCII: 10, 0xA)
virtual const Series< Key > & keys() const =0
Gets the keys of the table.
pointer operator->() const
Gets the element of the iterator.
virtual bool subordinated() const =0
Gets if the table is subordinated.
Binary directory buffer to operate on binary directories.
Definition: Binary.hpp:472
Inaccessibility(const std::string &what)
Constructs an exception.
const std::string & name() const
Gets the name of the loaded text.
Binary object buffer to operate on binary objects.
Definition: Binary.hpp:575
~Transaction()
Aborts and destructs the transaction.
const Array< Value::Time > & array_time() const
Short name alias for array<Value::Time>() const.
virtual bool reverse() const =0
Gets if the field is treated in reverse order.
@ PROCEDURE_INEXISTENT
Procedure inexistent.
virtual Result rename(const std::string &name, const std::string &name_renamed)=0
Renames a text.
void unload()
Unloads the loaded selection.
virtual Field & get(int table_number, int subrecord_number, int number) const =0
Gets a field by means of the number of the table, the number of the subrecord and the number of the f...
@ DATA_AREA_DIFFERENT
Data area different.
static Time now_local()
Gets the current time of the local timezone of the system.
@ VALUE
Variant holds a Value.
static void validate_throw(int year, int month, int day)
Validates a date by means of its year, month and day (of the month).
virtual const Table & table() const =0
Gets the table of the subrecord.
const Value & value() const
Gets the holded value of the variant.
@ TYPE_OF_EXPRESSION_IS_WRONG
Type of expression is wrong.
@ DATABASE_IN_STANDBY_MODE
Database in standby mode.
static const int NUMBER_MAXIMUM
Maximum number of a table.
Definition: Table.hpp:36
Exception of a filesystem.
Definition: Filesystem.hpp:46
IteratorConst cend() const noexcept
Gets a const-iterator of the element following the last element of the array.
@ MISSING_WHILE
Missing WHILE.
virtual Subrecord & get(int table_number, int number) const =0
Gets a subrecord by means of the number of the table and the number of the subrecord.
@ MISSING_COLON
Missing colon.
IteratorConst cbegin() const noexcept
Gets a const-iterator of the first element of the array.
std::function< void(Status status, float progress) > Callback
Callback of a diagnosis of a database.
Definition: Database.hpp:385
@ ARGUMENT_MISSING
Argument missing.
bool Logic
Boolean value.
Definition: Native.hpp:18
@ ABORTED
Reorganization aborted.
Generic constant field buffer of a record buffer.
Definition: Record.hpp:947
Result
Result of a reorganization of a key.
Definition: Key.hpp:78
@ OPERANDS_ARE_DIFFERENT
Operands are different.
IteratorConst & operator-=(difference_type offset)
Decrements the iterator.
Internal exception.
Definition: Exception.hpp:24
Connection to a database.
Definition: Database.hpp:46
Decimal number.
Definition: Decimal.hpp:12
Result clear_object(const std::string &path) const
Clears a binary object within the loaded binary directory.
static void validate_throw(int hours, int minutes, int seconds=0, int centiseconds=0)
Validates a time by means of its hours, minutes, seconds and centiseconds since midnight (00:00).
virtual const std::string & name() const =0
Gets the name of the key.
void associate(const Text &text)
Associates a text buffer with the input stream.
@ INVALID_DRIVE
Invalid drive.
const Value::Time & executed_time() const
Gets the time of the last execution of the loaded selection.
virtual void abort_all()=0
Aborts all active transactions.
Result read(Place place, Locking locking=Locking::NONE, bool reverse=false)
Reads a record by means of a place into the record buffer.
@ DATABASE_LOCKED_FOR_ROLLBACK
Database locked for rollback.
Result read(unsigned int id, Place place=Place::KEY)
Reads a user by means of a id into the user buffer.
int right_modify() const
Gets the right required by a user to modify the loaded selection.
IteratorConst end() const noexcept
Gets a const-iterator of the element following the last element of the array.
Input stream buffer for reading text buffers.
Definition: Text.hpp:645
@ NO_RIGHTS
Permissions insufficient.
@ ARRAY_INT
Variant holds an Array<Value::Int>.
bool operator<(const Time &other) const
Gets if the time is earlier than another time.
Iterator for elements of an array.
Definition: Array.hpp:410
Keys of a database.
Definition: Keys.hpp:14
@ MISSING_INSTRUCTION
Missing instruction.
Reorganization of a key.
Definition: Key.hpp:57
@ ARGUMENTS_DIFFERENT
Arguments different.
@ TABLE_INEXISTENT
Table inexistent.
int difference_type
Type of the difference of iterators.
Definition: Tables.hpp:112
Point in time relative to midnight (00:00) of a day.
Definition: Time.hpp:11
static const int YEAR_MINIMUM
Minimum year of a moment.
Definition: Moment.hpp:27
@ EXISTS
Entity already existent.
const Value::Word & value_word_const() const
Short name alias for value<Value::Word>() const.
bool loaded() const
Gets if a text is loaded into the text buffer.
StreamBufferInput()
Constructs an input stream buffer.
const Value::Byte & value_byte_const() const
Short name alias for value<Value::Byte>() const.
Database(const Client &client, const std::string &server_name, const std::string &name, const std::string &user_name, const std::string &user_password=std::string(), const std::string &server_password=std::string())
Constructs and connects to a database.
void set(Enumeration enumerator, bool set)
Sets a single enumerator of the flags.
Definition: Flags.hpp:147
@ USER_INEXISTENT
User inexistent.
Logout of a user from a database.
Definition: User.hpp:258
virtual const Key & key() const =0
Gets the key of the field.
@ USER_PASSWORD_INCORRECT
User password incorrect.
std::ptrdiff_t difference_type
Type of the difference of iterators.
Definition: Array.hpp:49
IteratorConst rbegin() const noexcept
Gets a const-iterator of the last table.
void abort()
Aborts the transaction if it is active.
bool operator>(const IteratorConst &other) const
Gets if the iterator is greater than another iterator.
const Fields & fields() const
Gets the fields of the database.
@ KEY_ANALYSIS
Option to perform a key analysis.
@ CIPHER_KEY_INCORRECT
Cipher key incorrect.
@ PROCEDURE_UNKNOWN
Procedure unknown.
const Record & record_source() const
Gets the source record buffer of the record set.
const Value::Float & value_float_const() const
Short name alias for value<Value::Float>() const.
@ MISSING_COMMA
Missing comma.
bool leap_year() const
Gets if the date lies in a leap year.
Iterator & operator+=(difference_type offset)
Increments the iterator.
@ FIELD_NOT_EXISTING
Field not exisiting.
RecordsKey(const Key &key, bool reverse=false)
Constructs a record set by means of a key.
Text(Database &database)
Constructs a text buffer.
Field of a link.
Definition: Link.hpp:62
virtual User::Logout::Result log_out(unsigned int id, unsigned int number, const std::string &server_password=std::string()) const =0
Logs a user out of the database.
virtual bool associated() const =0
Gets if there is text buffer associated with the stream buffer.
@ MAXIMUM
Maximum compression.
void toggle(Enumeration enumerator)
Toggles a single enumerator of the flags.
Definition: Flags.hpp:178
Result rename(const std::string &name)
Renames the loaded text.
void dissociate()
Dissociates an associated text buffer from the stream.
bool locked() const
Gets if the loaded binary is locked by the user accessing the database.
Tables of a database.
Definition: Tables.hpp:34
const_reference back() const
Gets the last element of the array.
Error error() const
Gets the error of the execution of a procedure.
void line_break_set(LineBreak line_break)
Sets the line break of the stream.
@ DATABASE_LOCKED_SHUTDOWN
Database locked (Database is shutting down).
bool reference() const
Gets if the variant holds a reference.
static const int YEAR_EPOCH
Epoch year of moments.
Definition: Moment.hpp:21
IteratorConst()
Constructs an invalid iterator.
@ CORRECTED
Diagnosis succeeded. Database corrected.
Result reload(Locking locking=Locking::NONE)
Reloads the loaded record.
RecordsSelection(const Selection &selection, bool reverse=false)
Constructs a record set by means of a selection buffer.
Record & operator=(const Record &other)
Assigns the record buffer from another record buffer.
Variant execute(const std::string &function_name, Arguments &&... arguments) const
Executes a function of a procedure.
Definition: Procedures.hpp:142
virtual const Table * get_if_existent(int number) const =0
Gets a table by means of its number, if existent.
Result write(Locking locking=Locking::NONE)
Writes the loaded text.
Client()
Constructs a client.
const std::string & release() const
Gets the release of the client.
@ KEY_FIELD_INEXISTENT
Key field inexistent.
@ LAST
Operate on the last entity.
@ VARIABLE_DIFFERS
Variable differs.
const Users & users() const
Gets the users accessing the database.
reference operator*() const
Gets the element of the iterator.
@ LINK_INEXISTENT
Link inexistent.
Result
Result of a logout of a user from the database.
Definition: User.hpp:267
const std::string & name() const
Gets the name of the loaded selection.
@ COMPILER_INSTRUCTION_INVALID
Compiler instruction invalid.
reference operator*() const
Gets the element of the iterator.
IteratorConst & operator+=(difference_type offset)
Increments the iterator.
static const Moment EMPTY
Empty moment (00000-00-00, 00:00:00).
Definition: Moment.hpp:39
static bool validate(int year, int month, int day, int hours=0, int minutes=0, int seconds=0, long int decimicroseconds=0)
Validates a moment by means of its year, month, day (of the month), hours, minutes,...
virtual int number() const =0
Gets the number of the field.
BinaryObject()
Constructs a binary object buffer.
@ REPAIRED
Diagnosis succeeded. Database repaired.
bool empty() const
Gets if the time is empty.
@ CONVERSION_FAILED
Conversion failed.
long int length_packed() const
Gets the length of the loaded, packed record.
const Value::Date & modified_date() const
Gets the date of the last modification of the loaded text.
@ INVALID_VALUE
Invalid value.
@ UNKNOWN_TYPE
Unknown type.
IteratorConst operator+(difference_type offset) const
Gets an incremented iterator.
constexpr bool contains(Enumeration enumerator) const
Gets if the flags contain an enumerator.
Definition: Flags.hpp:62
const-Iterator for elements of an array.
Definition: Array.hpp:263
IteratorConst & operator=(const IteratorConst &other)
Assigns the iterator from another iterator.
Result content_set(const std::string &content, LineBreak line_break=LineBreak::LF)
Sets the content of the loaded text.
@ LOCK_SHARED
Applies a shared lock to the entity.
const Variant & result() const
Gets the result of the execution.
int hours() const
Gets the hours of the moment.
static Time now()
Gets the current time (UTC) of the system.
virtual Database & database() const =0
Gets the database of the texts.
std::uint8_t Byte
Integer number (unsigned, 8 bits).
Definition: Native.hpp:20
Procedure(Database &database)
Constructs a procedure buffer.
virtual long long int prime_counter() const =0
Gets the prime counter of the table.
int user_count() const
Gets the count of users currently accessing the database.
const Texts & texts() const
Gets the texts of the database.
unsigned int number() const
Gets the number of the loaded user.
@ HANDLE_INVALID
Handle invalid.
Execution(const Database &database, const std::string &procedure_name, const std::string &function_name)
Constructs an execution of procedure.
virtual Result move_to(const BinaryDirectory &directory)
Moves the loaded binary to another directory.
Iterator & operator++()
Increments the iterator.
Result read_id(long long int id, Locking locking=Locking::NONE)
Reads a record by means of its id into the record buffer.
virtual const Table & destination_table() const =0
Gets the destination table of the link.
Generic stream buffer for text buffers.
Definition: Text.hpp:584
const std::string & system_name() const
Gets the name of the system of the loaded user.
Server hosting databases.
Definition: Server.hpp:11
@ DATABASE_LOCKED_STANDBY_UNREACHABLE
Database locked (Standby server unreachable).
const std::string & system_account_name() const
Gets the name of the system account of the loaded user.
void dissociate() override
Dissociates an associated text buffer from the output stream buffer.
Error error() const
Gets the error of a filesystem.
@ SERVER_STARTING_FAILED
Server starting failed.
bool operator>=(const Date &other) const
Gets if the date is equal to or later than another date.
@ ARRAY_BYTE
Variant holds an Array<Value::Byte>.
@ BINARY
Binary collation.
void right_write_set(int right_write)
Sets the right required by a user to write the loaded text.
const std::string & group() const
Gets the group of the loaded text.
const-Iterator for tables of a database.
Definition: Tables.hpp:102
@ MISSING_BRACKET
Missing bracket.
IteratorConst rbegin() const noexcept
Gets a const-iterator of the last element of the array.
@ SERVER_PASSWORD_INCORRECT
Server password incorrect.
@ VALUE_OUT_OF_DOMAIN
Value out of domain.
virtual const Table & table() const =0
Gets the table of the link.
@ DATABASE_LOCKED_FOR_LOGIN
Database locked for login.
@ DATA_STRUCTURE_NOT_LOADABLE
Data structure not loadable.
Unavailability(const std::string &what)
Constructs an exception.
void commit()
Commits the transaction if it is active.
@ MISSING_FUNCTION_CODE
Missing function code.
const Value::Bigint & value_bigint() const
Short name alias for value<Value::Bigint>() const.
virtual const std::string & release() const =0
Gets the release of the server.
Result record_remove(const Record &record) const
Removes a record from the loaded selection.
@ DATABASE_READ_ONLY
Database in read-only mode.
Error error() const
Gets the error of the connection to a database.
@ DEFINITION_INCOMPLETE
Definition incomplete.
const Error & error() const
Gets the error of the execution.
IteratorConst begin() const noexcept
Gets a const-iterator of the first table.
@ VALUE_WORD
Variant holds a Value::Word.
Result clear() const
Clears the loaded selection (i.e. removes all records from the selection).
const Key & key() const
Gets the key of the record set.
virtual const Table & table() const =0
Gets the table of the key.
bool leap_year() const
Gets if the moment lies in a leap year.
@ INVALID_CHARACTER
Invalid character.
const Value::Date & modified_date() const
Gets the date of the last modification of the loaded selection.
bool associated() const override
Gets if there is text buffer associated with the output stream buffer.
reference operator*() const
Gets the element of the iterator.
Result of a compilation of a procedure.
Definition: Procedure.hpp:666
int day() const
Gets the day (of the month) of the date.
@ MISSING_BEGIN
Missing BEGIN.
bool operator<(const IteratorGeneric &other) const
Gets if the iterator is lower than another iterator.
bool operator>(const IteratorGeneric &other) const
Gets if the iterator is greater than another iterator.
Generic series.
Definition: Series.hpp:11
@ UNEXPECTED_END_OF_TEXT
Unexpected end of text.
Field & operator=(const Value &value)
Sets the value of the field buffer.
static const Time EMPTY
Empty time (00:00:00).
Definition: Time.hpp:20
Transaction of a database.
Definition: Transaction.hpp:49
Time & operator=(const Time &other)
Assigns the time from another time.
@ UMLAUTS
Umlaut converting collation.
@ INVALID_LABEL
Invalid label.
virtual bool reverse() const =0
Gets if the field is treated in reverse order.
const Element & const_reference
Type of a constant reference to an element of the array.
Definition: Array.hpp:190
bool operator!=(const IteratorConst &other) const
Gets if the iterator is unequal to another iterator.
const std::string & network_account_name() const
Gets the name of the network account of the loaded user.
@ BACKUP
Database in backup mode.
State
State of a transaction.
Definition: Transaction.hpp:57
Logout::Result log_out(const std::string &server_password=std::string()) const
Logs the loaded user out of the database.
bool operator>(const Moment &other) const
Gets if the moment is later than another moment.
@ OK
Diagnosis succeeded. Database okay.
const Element & get(size_type number) const
Gets an element of the series by meants if its number.
void associate(Text &text)
const Record & record() const
Gets the record buffer of the record set.
long long int serial() const
Gets the serial of the moment in units of decimicroseconds since the epoch.
FieldConst< Value > field(const C16::Field &field) const
Convenience alias for Record::FieldConst<Value>(const Record& record, const Field& field).
bool operator<(const IteratorConst &other) const
Gets if the iterator is lower than another iterator.
@ NONE
Variant holds nothing.
const std::string & modified_user() const
Gets the user who last modified the loaded binary object.
Iterator & operator=(const Iterator &other)
Assigns the iterator from another iterator.
@ ARRAY_DATE
Variant holds an Array<Value::Date>.
virtual Database & database() const =0
Gets the database of the field.
virtual const std::string & operating_system() const =0
Gets the operating system of the server.
@ MEMORY_EXHAUSTED
Memory exhausted.
const Procedures & procedures() const
Gets the procedures of the database.
@ TOO_MANY_OPEN_FILES
Too many open files.
static const int NAME_LENGTH_LIMIT
Name length limit.
Definition: Selection.hpp:66
void modified_moment_file_set(const Value::Moment &moment)
Sets the moment of the last file modification of the loaded binary object.
virtual const Fields & fields() const =0
Gets the fields of the table.
Error error
Error of the result of the compilation.
Definition: Procedure.hpp:672
static Date now()
Gets the current date (UTC) of the system.
Element & reference
Type of a reference to an element of the array.
Definition: Array.hpp:195
@ ACTIVE
Transaction is active.
@ DATA_AREA_NOT_INSTANCED
Data area not instanced.
@ SPECIAL_CHARACTERS
Special character converting collation.
void associate(Text &text)
Associates a text buffer with the output stream.
const Value::Date & value_date() const
Short name alias for value<Value::Date>() const.
@ UPDATE
Database in update mode.
@ ABORTED
Transaction was aborted.
@ PREVIOUS
Operate on the previous entity.
int week() const
Gets the week (according to ISO 8601) of the moment.
Value::Moment modified_moment() const
Gets the moment of the last modification of the loaded binary object.
Result content_copy_from(const BinaryObject &other)
Copies the contents from another binary object to the loaded binary object.
const Variant & execute_error_throw()
Executes the execution and throws an exception if the execution has an error.
Iterator & operator--()
Decrements the iterator.
static const int NAME_LENGTH_LIMIT
Name length limit.
Definition: Binary.hpp:34
Common field buffer of a record buffer.
Definition: Record.hpp:904
const std::string & path() const
Gets the path of the loaded binary.
virtual bool empty() const
Gets if the array is empty.
@ FRAME_DIFFERENT
Frame different.
Flags< Status > status() const
Gets the status of the database.
static void validate_throw(int year, int month, int day, int hours=0, int minutes=0, int seconds=0, long int decimicroseconds=0)
Validates a moment by means of its year, month, day (of the month), hours, minutes,...
virtual int number() const =0
Gets the number of the subrecord.
static const int YEAR_MAXIMUM
Maximum year of a date.
Definition: Date.hpp:32
@ VALUE_DECIMAL
Variant holds a Value::Decimal.
void add(const std::initializer_list< Enumeration > &enumerators)
Adds multiple enumerators to the flags.
Definition: Flags.hpp:95
int right_read() const
Gets the right required by a user to read the loaded text.
unsigned long long int memory_usage() const
Gets the memory usage of the client in units of bytes.
@ DIAGNOSIS
Database diagnosing.
void unload()
Unloads the loaded user.
@ DONE
Reorganization done.
Value value() const
Gets the value of the field buffer.
long int length() const
Gets the length of the loaded record.
@ MISSING_ENDIF_DIRECTIVE
Missing @ENDIF directive.
const Text * text() const
Gets the text buffer associated with the stream, if associated.
@ MISSING_PARENTHESIS
Missing parenthesis.
long int size_free() const
Gets the size of free space of the database in units of kilobytes.
const Table & table() const
Gets the table of the record buffer.
virtual int length_limit() const =0
Gets the length limit of the field.
const Database & database() const
Gets the database the user buffer relates to.
void add(Enumeration enumerator)
Adds a single enumerator to the flags.
Definition: Flags.hpp:83
virtual const Table & table() const =0
Gets the table of the field.
Option
Option for a diagnosis of a database.
Definition: Database.hpp:325
Space
Space of a variant.
Definition: Variant.hpp:86
Iterator()
Constructs an invalid iterator.
@ SERVER_DATA_STRUCTURE
Server could not load data structure.
virtual const Link & link() const =0
Gets the link of the field.
int year() const
Gets the year of the date.
@ ARRAY_WORD
Variant holds an Array<Value::Word>.
virtual long int records_count() const =0
Gets the count of records of the table.
Execution of a procedure.
Definition: Procedure.hpp:126
@ MISSING_SEMICOLON
Missing semicolon.
@ KEY_INEXISTENT
Key inexistent.
Record set of records restricted and ordered by a link.
Definition: RecordsLink.hpp:14
virtual int number() const =0
Gets the number of the table.
const Table & table() const
Gets the table of the record set.
const Array< Value::Decimal > & array_decimal() const
Short name alias for array<Value::Decimal>() const.
virtual Result read(const BinaryDirectory &directory, const std::string &name, Place place=Place::KEY, Locking locking=Locking::NONE)=0
Reads a binary by means of a base binary directory, a reference name and a place into the binary buff...
virtual Database & database() const =0
Gets the database of the field.
int milliseconds() const
Gets the milliseconds of the moment since the last second.
@ SUBRECORD_INEXISTENT
Subrecord inexistent.
void set(const std::initializer_list< Enumeration > &enumerators, bool set)
Sets multiple enumerators of the flags.
Definition: Flags.hpp:166
@ VALUE_DATE
Variant holds a Value::Date.
@ USER_UNAUTHORIZED
User unauthorized.
Result read(const std::string &name, Place place=Place::KEY, Locking locking=Locking::NONE)
Reads a selection by means of a reference name and a place into the selection buffer.
@ SERVER_USER_LIMIT_REACHED
Server user limit reached.
@ STACK_OVERFLOW
Stack overflow occurred.
void remove(Enumeration enumerator)
Removes a single enumerator from the flags.
Definition: Flags.hpp:107
void modified_user_set(const std::string &user)
Sets the user who last modified the loaded binary object.
@ VALUE_INVALID
Value invalid.
@ VALUE_FLOAT
Variant holds a Value::Float.
const std::string & modified_user() const
Gets the user who last modified the loaded selection.
bool operator>=(const IteratorGeneric &other) const
Gets if the iterator is greater than or equal to another iterator.
Iterator operator+(difference_type offset) const
Gets an incremented iterator.
void toggle(const std::initializer_list< Enumeration > &enumerators)
Toggles multiple enumerators of the flags.
Definition: Flags.hpp:190
static const Time MINIMUM
Minimum time (00:00:00).
Definition: Time.hpp:26
void line_break_set(LineBreak line_break)
Sets the line break of the stream buffer.
@ INVALID_CONSTANT
Invalid constant.
Procedure buffer to operate on procedures of a database.
Definition: Procedure.hpp:108
const Array< Value::Word > & array_word() const
Short name alias for array<Value::Word>() const.
int compare(const Time &other) const
Compares the time with another time.
Iterator & operator-=(difference_type offset)
Decrements the iterator.
Result create(const BinaryDirectory &directory, const std::string &path, Locking locking=Locking::LOCK_SHARED, bool overwrite=false) override
Creates and loads a binary.
int minutes() const
Gets the minutes of the time since the last hour.
Exception caused by unavailability.
Definition: Exception.hpp:55
Collation
Collation of a field.
Definition: Field.hpp:80
Alternative
Alternative of a variant.
Definition: Variant.hpp:37
@ CASE
Case insensitive collation.
const Server & server() const
Gets the server hosting the database.
static int days_in_month(int year, int month)
Gets the days in a month.
const Link & link() const
Gets the link of the record set.
Result replace(Locking locking=Locking::NONE)
Replaces the loaded record.
bool reverse() const
Gets if the order of the records is reverted.
bool operator==(const Moment &other) const
Gets if the moment is equal to another moment.
@ PROPERTY_INVALID
Property invalid.
virtual const std::string & license() const =0
Gets the license of the server.
const Value::Date & login_date() const
Gets the date of the login of the loaded user to the database.
@ FRAME_INEXISTENT
Frame inexistent.
StreamOutput()
Constructs an output stream.
int seconds() const
Gets the seconds of the time since the last minute.
virtual Reorganization::Result reorganize(const Reorganization::Callback &callback=Reorganization::Callback()) const
Reorganizes the key.
Generic iterator of an array.
Definition: Array.hpp:39
@ TOO_FEW_ARGUMENTS
Too few arguments.
virtual Database & database() const =0
Gets the database of the keys.
const Database & database() const
Gets the database of the selection buffer.
@ DECIMAL_ARITHMETIC_FAILED
Decimal arithmetic failed.
const std::string & modified_user() const
Gets the user who last modified the loaded text.
@ LIMIT_REACHED
Limit reached.
User buffer to operate on users of a database.
Definition: User.hpp:57
constexpr Flags(const std::initializer_list< Enumeration > &enumerators)
Constructs flags by means of enumerators.
Definition: Flags.hpp:49
constexpr value_type value() const
Gets the value of the flags.
Definition: Flags.hpp:71
const Value::Date & value_date_const() const
Short name alias for value<Value::Date>() const.
IteratorConst operator-(difference_type offset) const
Gets a decremented iterator.
IteratorConst begin() const noexcept
Gets a const-iterator of the first element of the array.
int compare(const Moment &other) const
Compares the moment with another moment.
const Text * text() const override
Gets the text buffer associated with the input stream buffer, if associated.
const Value::Date & created_date() const
Gets the date of the creation of the loaded selection.
const Element value_type
Type of the elements of the iterator.
Definition: Array.hpp:271
@ NEXT
Operate on the next entity.
Iterator operator-(difference_type offset) const
Gets a decremented iterator.
virtual const Table & table() const =0
Gets the table of the field.
Exception of the execution of a procedure.
Definition: Procedure.hpp:399
bool operator==(const IteratorConst &other) const
Gets if the iterator is equal to another iterator.
@ DATA_AREA_INEXISTENT
Data area inexistent.
virtual size_type size() const =0
Gets the size of the array.
@ ARRAY_DECIMAL
Variant holds an Array<Value::Decimal>.
virtual int number() const =0
Gets the number of the key.
const std::string & system_ip_address() const
Gets the IP address of the system of the loaded user.
static const Date EMPTY
Empty date (0000-00-00).
Definition: Date.hpp:38
Value::Moment created_moment() const
Gets the moment of the creation of the loaded binary object.
virtual const Text * text() const =0
Gets the text buffer associated with the stream buffer, if associated.
bool operator<=(const Moment &other) const
Gets if the moment is equal to or earlier than another moment.
const Tables & tables() const
Gets the tables of the database.
@ ERROR_READING_COMPILE_TABLE
Error reading compile table.
@ COMPILE_TABLE_NOT_DEFINED
Compile table not defined.
virtual Database & database() const =0
Gets the database of the table.
IteratorConst crbegin() const noexcept
Gets a const-iterator of the last element of the array.
IteratorConst & operator+=(difference_type offset)
Increments the iterator.
long int decimicroseconds() const
Gets the decimicroseconds of the moment since the last second.
virtual Result create(const std::string &name, Locking locking=Locking::NONE)=0
Creates a text.
const Value::Decimal & value_decimal() const
Short name alias for value<Value::Decimal>() const.
static const int TYPE_LENGTH_LIMIT
Type length limit.
Definition: Binary.hpp:584
const Element * pointer
Type of a pointer to an element of the iterator.
Definition: Array.hpp:281
Status
Status of a reorganization of a key.
Definition: Key.hpp:65
virtual long int count() const =0
Gets the count of records of the record set.
constexpr Flags()
Constructs empty flags.
Definition: Flags.hpp:38
virtual const Table * master_table() const =0
Gets the master table of the table, if subordinated.
@ MISSING_ASSIGNMENT
Missing assignment.
bool operator>=(const Moment &other) const
Gets if the moment is equal to or later than another moment.
Element value_type
Type of the elements of the array.
Definition: Array.hpp:185
static const int USER_LENGTH_LIMIT
User length limit.
Definition: Binary.hpp:590
Error
Error of the compilation of a procedure.
Definition: Procedure.hpp:547
bool aborted() const
Gets if the transaction was aborted.
@ TYPE_DIFFERENT
Type different.
@ WRONG_COMPILE_TABLE_VERSION
Wrong compile table version.
bool active() const
Gets if the transaction is active.
const std::string & type_custom() const
Gets the custom type the loaded binary object.
const Value::Word & value_word() const
Short name alias for value<Value::Word>() const.
virtual Database & database() const =0
Gets the database of the links.
int compare(const Date &other) const
Compares the date with another date.
Result erase()
Deletes a record from the table.
virtual Database & database() const =0
Gets the database of the key.
Compilation of a procedure.
Definition: Procedure.hpp:525
Result
Result of a diagnosis of a database.
Definition: Database.hpp:359
const Value::Float & value_float() const
Short name alias for value<Value::Float>() const.
@ KEY_ANALYSIS
Key analysation.
void reverse_set(bool reverse)
Sets if the order of the records is reverted.
virtual Result erase(const std::string &name)=0
Deletes a text.
@ ACCESS_DENIED
Access denied.
void created_moment_set(const Value::Moment &moment)
Sets the moment of the creation of the loaded binary object.
Generic field buffer of a record buffer.
Definition: Record.hpp:971
const_reference at(size_type index) const
Gets an element of the array by means of its index.
Exception caused by inaccessibility.
Definition: Exception.hpp:135
@ READ_ONLY
Database in read-only mode.
@ PATH_NOT_FOUND
Path not found.
@ FIRST
Operate on the first entity.
Result create(const BinaryDirectory &directory, const std::string &path, Locking locking=Locking::LOCK_SHARED, bool overwrite=false) override
Creates and loads a binary.
Result reload(Locking locking=Locking::NONE)
Reloads the loaded selection.
@ SELECTIONS_HAVE_VALUE_SET
Selections have value set.
Alternative alternative() const
Gets the alternative of the variant.
virtual int length_limit() const =0
Gets the length limit of the field.
Diagnosis of a database.
Definition: Database.hpp:317
IteratorConst crend() const noexcept
Gets a const-iterator of the element preceding the first element of the array.
Generic stream for text buffers.
Definition: Text.hpp:783
void backup(unsigned int duration_minutes) const
Transfers the database to backup mode.
bool empty() const
Gets if the date is empty.
const Links & links() const
Gets the links of the database.
Error
Error of an operation on a binary.
Definition: Binary.hpp:45
@ CONTENT_EMPTY
Content empty.
bool operator>(const Date &other) const
Gets if the date is later than another date.
Place
Place of an database entity of an operation.
Definition: Place.hpp:12
virtual Field * get_if_existent(int table_number, int subrecord_number, int number) const =0
Gets a field by means of the number of the table, the number of the subrecord and the number of the f...
unsigned int id() const
Gets the id of the loaded user.
Link of a table.
Definition: Link.hpp:16
@ VALUE_TIME
Variant holds a Value::Time.
Text buffer to operate on texts of a database.
Definition: Text.hpp:64
void remove(const std::initializer_list< Enumeration > &enumerators)
Removes multiple enumerators from the flags.
Definition: Flags.hpp:119
Generic array.
Definition: Array.hpp:12
const Transactions & transactions() const
Gets the transactions performed by the user accessing the database.
Container holding one of many alternatives.
Definition: Variant.hpp:29
Result lock_key(int key_number, Locking locking=Locking::LOCK_EXCLUSIVE, bool reverse=false) const
Applies a locking to a record by means of a key.
int right_write() const
Gets the right required by a user to write the loaded text.
@ VALUE_INT
Variant holds a Value::Int.
static const Moment MINIMUM
Minimum moment (01601-01-01, 00:00:00).
Definition: Moment.hpp:45
@ USER_SELF
User is the user accessing the database.
Result reload(Locking locking=Locking::NONE)
Reloads the loaded text.
virtual const Series< Link > & links() const =0
Gets the links of the table.
virtual const std::string & name() const =0
Gets the name of the field.
static const int GROUP_LENGTH_LIMIT
Group length limit.
Definition: Text.hpp:79
Result read_position_link(const Record &record_source, int link_number, long int position, Locking locking=Locking::NONE, bool reverse=false)
Reads a record by means of its position dependent on a link into the record buffer.
Result reload()
Reloads the loaded user.
Links of a database.
Definition: Links.hpp:14
@ ARRAY_ALPHA
Variant holds an Array<Value::Alpha>.
Procedure::Execution execution(const std::string &procedure_name, const std::string &function_name) const
Gets an execution of a function of a procedure.
const Text * text() const override
Gets the text buffer associated with the output stream buffer, if associated.
@ SERVER_PASSWORD_INCORRECT
Server password incorrect.
Status
Status of a database.
Definition: Database.hpp:254
Period of time covering a day.
Definition: Date.hpp:11
bool operator==(const IteratorGeneric &other) const
Gets if the iterator is equal to another iterator.
Constant field buffer of a record buffer.
Definition: Record.hpp:1004
@ DIVISION_BY_ZERO
Division by zero occurred.
Execution execution(const std::string &function_name) const
Gets an execution of a function of the procedure.
Record(const Table &table)
Constructs a record buffer by means of its table.
virtual Procedure::Compilation::Error compile(const std::string &name) const =0
Compiles a procedure and gets its error.
Database & database() const
Gets the database of the text buffer.
virtual const Key & destination_key() const =0
Gets destination key of the link.
Result read(const BinaryDirectory &directory, const std::string &name, Place place=Place::KEY, Locking locking=Locking::NONE) override
Reads a binary by means of a base binary directory, a reference name and a place into the binary buff...
IteratorConst & operator--()
Decrements the iterator.
const Value::Alpha & value_alpha() const
Short name alias for value<Value::Alpha>() const.
const std::string & system_hostname() const
Gets the hostname of the system of the loaded user.
virtual long int records_count_link(const Record &record_source, int link_number) const =0
Gets the count of records of a link to the table.
@ DEFECTIVE
Diagnosis succeeded. Database defective.
LineBreak line_break() const
Gets the line break of the stream buffer.
bool personal() const
Gets if the loaded text is private.
void assign(int year, int month, int day)
Assigns the date by means of its year, month and day (of the month).
Value value() const
Gets the value of the field buffer.
@ READ_2
Structure diagnosis (phase 2).
int day_of_year() const
Gets the day of the year of the moment.
@ PROCEDURE_CODE_TOO_LONG
Procedure code too long.
IteratorConst end() const noexcept
Gets a const-iterator of the table following the last table.
const Array< Value::Float > & array_float() const
Short name alias for array<Value::Float>() const.
virtual Field * get_if_existent(const std::string &name) const =0
Gets a field by means of its name, if existent.
virtual Result record_lock_position_key(int key_number, long int position, Locking locking=Locking::LOCK_EXCLUSIVE, bool reverse=false) const =0
Applies a locking to a record by means of its position dependent on a key.
int week_year() const
Gets the year of the week (according to ISO 8601) of the moment.
RecordsLink(const Link &link, bool reverse=false)
Constructs a record set by means of a link.
@ MISSING_ARGUMENTS
Missing arguments.
int seconds() const
Gets the seconds of the moment since the last minute.
bool encrypted() const
Gets if the loaded text is encrypted.
@ VALUE_BYTE
Variant holds a Value::Byte.
Result read(const std::string &name, Place place=Place::KEY, Locking locking=Locking::NONE)
Reads a text by means of a reference name and a place into the text buffer.
@ VALUE_ALPHA
Variant holds a Value::Alpha.
@ WRITE_FAULT
Write fault occurred.
Generic exception.
Definition: Exception.hpp:10
int milliseconds() const
Gets the milliseconds of the time since the last second.
static Date now_local()
Gets the current date of the local timezone of the system.
@ CLIENT_USER_LIMIT_REACHED
Client user limit reached.
@ MISSING_END
Missing END.
virtual Result record_test_id(long long int id) const =0
Tests the existence of a record by means of its id.
Record set of records ordered by a key.
Definition: RecordsKey.hpp:14
Set of enumerators.
Definition: Flags.hpp:15
long int serial() const
Gets the serial of the time in units of centiseconds since midnight (00:00).
@ LINK_INVALID
Link valid.
int day_of_week() const
Gets the day of the week of the date.
@ SERVER_UNREACHABLE
Server unreachable.
int user_id() const
Gets the id of the user accessing the database.
void reset()
Resets the execution.
static const Time MAXIMUM
Maximum time (23:59:59.99).
Definition: Time.hpp:32
@ NO_KEY
Entity inexistent but following entity existent.
Absolute point in time.
Definition: Moment.hpp:12
@ RUNNING
Reorganization running.
@ DEADLOCK
Deadlock occurred.
@ READ_1
Structure diagnosis (phase 1).
LineBreak
Line break.
Definition: Text.hpp:84
@ KEY
Operate on the entity identified by its key value.
static const Moment MAXIMUM
Maximum moment (30000-12-31, 23:59:59.9999999).
Definition: Moment.hpp:51
static constexpr Enumeration NOTHING
Valueless enumerator.
Definition: Flags.hpp:32
void modified_moment_set(const Value::Moment &moment)
Sets the moment of the last modification of the loaded binary object.
int day() const
Gets the day (of the month) of the moment.
long int records_count() const
Gets the count of records of the loaded selection.
static bool validate(int hours, int minutes, int seconds=0, int centiseconds=0)
Validates a time by means of its hours, minutes, seconds and centiseconds since midnight (00:00).
virtual int user_limit() const =0
Gets the user limit of the server.
StreamInput()
Constructs an input stream.
@ INVALID_PROPERTY
Invalid property.
Variant()
Constructs a variant holding nothing.
int year() const
Gets the year of the moment.
Result erase() const
Deletes the loaded text.
@ EXPRESSION_NOT_CONSTANT
Expression not constant.
void encrypted_set(bool encrypted)
Sets if the loaded text is encrypted.
@ PROCEDURE_DOES_NOT_EXIST
Procedure does not exist.
Exception(Error error)
Constructs an exception of an operation on a binary.
@ FILE_NOT_FOUND
File not found.
const_reference front() const
Gets the first element of the array.
std::size_t size_type
Type of the size of the array.
Definition: Array.hpp:20
@ LINK_FIELD_INEXISTENT
Link field inexistent.
@ DATABASE_IN_USE
Database in use.
const Value::Byte & value_byte() const
Short name alias for value<Value::Byte>() const.
void assign(int year, int month, int day, int hours=0, int minutes=0, int seconds=0, long int decimicroseconds=0)
Assigns the moment by means of its year, month, day (of the month), hours, minutes,...
Time()
Constructs a zeroed time.
const Record & record() const override
Gets the record buffer of the field buffer.
virtual const C16::Field & field() const =0
Gets the field of the table of the field.
static const Date MINIMUM
Minimum date (1900-01-01).
Definition: Date.hpp:44
@ DATABASE_LOCKED
Database locked.
@ DATABASE_OPENING_FAILED
Database opening failed.
@ PROCEDURE_CURRENTLY_PROCESSED
Procedure currently processed.
@ DATABASE_INEXISTENT
Database inexistent.
long int microseconds() const
Gets the microseconds of the moment since the last second.
Transactions performed by the user accessing the database.
Definition: Transactions.hpp:12
bool operator<(const Moment &other) const
Gets if the moment is earlier than another moment.
void clear()
Empties the moment.
static const Date MAXIMUM
Maximum date (2154-12-31).
Definition: Date.hpp:50
Moment & operator=(const Moment &other)
Assigns the moment from another moment.
long long int last_request_duration() const
Gets the duration since the last request of the loaded user to the database in units of seconds.
@ DATABASE_INCOMPATIBLE
Database incompatible.
IteratorConst operator-(difference_type offset) const
Gets a decremented iterator.
Exception(Error error)
Constructs an exception of the connection to a database.
const std::string & name() const
Gets the name of the database.
const Array< Value::Bigint > & array_bigint() const
Short name alias for array<Value::Bigint>() const.
IteratorConst rend() const noexcept
Gets a const-iterator of the table preceding the first table.
int column_number
Number of the column within the line of the procedure that caused the error.
Definition: Procedure.hpp:692
Compression
Compression of a binary object.
Definition: Binary.hpp:595
Result read_key(int key_number, Place place=Place::KEY, Locking locking=Locking::NONE, bool reverse=false)
Reads a record by means of a key and a place into the record buffer.
@ CR
Carriage return (ASCII: 13, 0xD)
virtual const Key * get_if_existent(int table_number, int number) const =0
Gets a key by means of the number of the table and the number of the key, if existent.
bool operator!=(const Moment &other) const
Gets if the moment is unequal to another moment.
int user_number() const
Gets the number of user accessing the database.
@ OPEN_FAILED
Open failed.
@ NOT_ENOUGH_MEMORY
Not enough memory.
@ DATABASE_LOCKED_BY_ADMINISTRATOR
Database locked by administrator.
static const int ARGUMENT_COUNT_LIMIT
Argument count limit.
Definition: Procedure.hpp:167
virtual const Series< Subrecord > & subrecords() const =0
Gets the subrecords of the table.
@ SERVER_MEMORY_INSUFFICIENT
Memory of server insufficient.
Locking
Locking to apply to a database entity.
Definition: Locking.hpp:12
Diagnosis::Result diagnose(const Flags< Diagnosis::Option > &options, const Diagnosis::Callback &callback=Diagnosis::Callback()) const
Diagnoses the database.
Invalidity(const std::string &what)
Constructs an exception.
virtual int number() const =0
Gets the number of the field.
bool operator==(const Date &other) const
Gets if the date is equal to another date.
virtual Result create(const BinaryDirectory &directory, const std::string &path, Locking locking=Locking::LOCK_SHARED, bool overwrite=false)=0
Creates and loads a binary.
std::string Alpha
String.
Definition: Native.hpp:16
void group_set(const std::string &group)
Sets the group of the loaded text.
Result insert(Locking locking=Locking::NONE)
Inserts a record into the table.
Date & operator=(const Date &other)
Assigns the date from another date.
void right_read_set(int right_read)
Sets the right required by a user to read the loaded text.
const Value::Date & created_date() const
Gets the date of the creation of the loaded text.
long int position_key(int key_number, bool reverse=false) const
Gets the position of the loaded record dependent on a key.
@ MISSING_CASE
Missing CASE.
@ NONE
Does not change the lock of the entity.
Date()
Constructs an empty date.
@ TOO_MANY_ARGUMENTS
Too many arguments.
@ FIELD_INEXISTENT
Field inexistent.
virtual const Series< Field > & fields() const =0
Gets the fields of the link.
const Value & value_const() const
Gets the holded value of the variant.
Texts of a database.
Definition: Texts.hpp:15
bool loaded() const
Gets if a user is loaded into the user buffer.
const Array< Value::Alpha > & array_alpha() const
Short name alias for array<Value::Alpha>() const.
bool operator==(const Record &other) const
Gets if the loaded record equals another record.
virtual const Table & table() const =0
Gets the table of the field.
Exception caused by difference.
Definition: Exception.hpp:115
void type_custom_set(const std::string &type_custom)
Sets the custom type of the loaded binary object.
virtual void custom_set(const std::string &custom)
Sets the custom property of the loaded binary.
unsigned long long int memory_usage_peak() const
Gets the peak memory usage of the client in units of bytes.
Field(Record &record, const C16::Field &field)
Constructs a field buffer of a record buffer by means of its corresponing field.
@ READ_FAULT
Read fault occurred.
static Moment now_local()
Gets the current moment of the local timezone of the system.
@ PROCEDURE_CODE_INCOMPATIBLE
Procedure code incompatible.
void assign(int hours, int minutes, int seconds=0, int centiseconds=0)
Assigns the time by means of its hours, minutes, seconds and centiseconds since midnight (00:00).
@ OPERATION_ILLEGAL
Operation illegal.
bool operator<=(const IteratorGeneric &other) const
Gets if the iterator is lower than or equal to another iterator.
const Value::Time & modified_time() const
Gets the time of the last modification of the loaded text.
Record buffer to operate on records of a table.
Definition: Record.hpp:173
virtual const Key & get(int table_number, int number) const =0
Gets a key by means of the number of the table and the number of the key.
Selection(const Database &database, int table_number)
Constructs a selection buffer by means of the database and the number of its table.
virtual Result record_lock_position_link(const Record &record_source, int link_number, long int position, Locking locking=Locking::LOCK_EXCLUSIVE, bool reverse=false) const =0
Applies a locking to a record by means of its position dependent on a link.
User(const Database &database)
Constructs a user buffer.
IteratorConst & operator-=(difference_type offset)
Decrements the iterator.
int backup_duration_remaining() const
Gets the remaining backup duration of the database in units of seconds.
virtual int right_output() const =0
Gets the right required by a user to output the field.
Variant execute(const std::string &function_name, Arguments &&... arguments) const
Executes a function of the procedure.
Definition: Procedure.hpp:509
IteratorConst & operator--()
Decrements the iterator.
const std::string & type() const
Gets the type the loaded binary object.
const std::string & version() const
Gets the version of the database.
void argument_add_reference(Value::Alpha &argument)
Adds a single argument to the execution which is passed by reference.
Result create(const std::string &name, Locking locking=Locking::NONE)
Creates and loads a text.
const std::string & custom() const
Gets the custom property of the loaded binary.
virtual const std::string & name() const =0
Gets the name of the server.
static const int NUMBER_MINIMUM
Minimum number of a table.
Definition: Table.hpp:30
int line_number
Number of the line of the procedure that caused the error.
Definition: Procedure.hpp:685
bool comitted() const
Gets if the transaction was comitted.
@ UNKNOWN_LABEL
Unknown label.
@ OTHER
Other error occurred.
Exception(Error error)
Constructs an exception of a filesystem.
@ SHARING_VIOLATION
Sharing violation occurred.
Database hosted by a server.
Definition: Database.hpp:38
virtual const Link & get(int table_number, int number) const =0
Gets a link by means of the number of the table and the number of the link.
@ ABORTED
Reorganization aborted.
const std::string & created_user() const
Gets the user who created the loaded binary object.
IteratorConst & operator=(const IteratorConst &other)
Assigns the iterator from another iterator.
@ INVALID_INSTRUCTION
Invalid instruction.
Procedures of a database.
Definition: Procedures.hpp:74
const Value::Time & created_time() const
Gets the time of the creation of the loaded selection.
Result
Result of an operation related to a database entity.
Definition: Result.hpp:12
long int position_link(const Record &record_source, int link_number, bool reverse=false) const
Gets the position of the loaded record dependent on a link.
pointer operator->() const
Gets the element of the iterator.
const Value::Date & executed_date() const
Gets the date of the last execution of the loaded selection.
@ CR_LF
Carriage return & line feed (ASCII: 13 10, 0xD 0xA)
Result record_insert(const Record &record) const
Inserts a record into the loaded selection.
const Field & field() const
Gets the field of the field buffer.
Result content_import_from_file(const std::string &file_path, Compression compression=Compression::NONE, const std::string &cipher_key=std::string())
Imports the content of the loaded binary object from a file.
bool associated() const override
Gets if there is text buffer associated with the input stream buffer.
const Value::Time & created_time() const
Gets the time of the creation of the loaded text.
std::string line_text
Text of the line of the procedure that caused the error.
Definition: Procedure.hpp:698
Difference(const std::string &what)
Constructs an exception.
bool operator!=(const Date &other) const
Gets if the date is unequal to another date.
virtual bool unique() const =0
Gets if the key is unique.
Input stream for reading texts.
Definition: Text.hpp:871
@ SOUNDEX_2
Soundex 2 collation.
bool origin() const
Gets if the database is the origin database.
static const int YEAR_MINIMUM
Minimum year of a date.
Definition: Date.hpp:26
@ LAST_REC
Entity and following entity inexistent but preceding entity existent.
Result read(const BinaryDirectory &directory, const std::string &name, Place place=Place::KEY, Locking locking=Locking::NONE) override
Reads a binary by means of a base binary directory, a reference name and a place into the binary buff...
const Value::Bigint & value_bigint_const() const
Short name alias for value<Value::Bigint>() const.
Value::Moment modified_moment_file() const
Gets the moment of the last file modification of the loaded binary object.
Result copy(const std::string &name) const
Copies the loaded text.
long int serial() const
Gets the serial of the date in units of days since the epoch.
virtual Result write() const =0
Writes the loaded binary.
virtual Database & database() const =0
Gets the database of the tables.
@ TABLE_INVALID
Table invalid.
const BinaryDirectory & binary_directory_root() const
Gets the root binary directory of the database.
static const int NAME_LENGTH_LIMIT
Name length limit.
Definition: Text.hpp:73
int month() const
Gets the month of the moment.
Compilation::Result compile_result(Compilation::ErrorLanguage error_language=Compilation::ErrorLanguage::ENGLISH_US) const
Compiles the procedure and gets its result.
@ SYSTEM_ACCOUNT
Language of the system account.
bool associated() const
Gets if there is text buffer associated with the stream.
LineBreak line_break() const
Gets the line break of the stream.
@ RECOVERY
Option to perform a recovery.
Fields of a table.
Definition: Table.hpp:341
@ INVALID_SECTION
Invalid section.
IteratorConst & operator++()
Increments the iterator.
virtual int number() const =0
Gets the number of the field.
void associate(const Text &text)
void clear(bool empty=false)
Zeros or empties the time.
Client to access a server hosting databases.
Definition: Client.hpp:21
std::uint16_t Word
Integer number (unsigned, 16 bits).
Definition: Native.hpp:22
const Array< Value::Int > & array_int() const
Short name alias for array<Value::Int>() const.
virtual Database & database() const =0
Gets the database of the subrecord.
@ LOCK_VIOLATION
Lock violation occurred.
Record set of records restricted and ordered by a selection.
Definition: RecordsSelection.hpp:16
void unload() override
Unloads the loaded binary.
Result write() const override
Writes the loaded binary.
@ VALUE_OUT_OF_RANGE
Value out of range.
const Value::Time & login_time() const
Gets the time of the login of the loaded user to the database.
Exception of an operation on a binary.
Definition: Binary.hpp:58
int month() const
Gets the month of the date.
int day_of_week() const
Gets the day of the week of the moment.
@ SELECTIONS_IDENTICAL
Selections idenctical.
@ DATABASE_IN_ROLLBACK_MODE
Database in rollback mode.
bool operator!=(const IteratorGeneric &other) const
Gets if the iterator is unequal to another iterator.
const Array< Value::Date > & array_date() const
Short name alias for array<Value::Date>() const.
FieldConst< Value > field_const(const C16::Field &field) const
Convenience alias for Record::FieldConst<Value>(const Record& record, const Field& field).
int centiseconds() const
Gets the centiseconds of the time since the last second.
void error_throw() const
Throws an exception if the execution has an error.
FieldConst(const Record &record, const C16::Field &field)
Constructs a constent field buffer of a record buffer by means of its corresponing field.
long int size() const
Gets the size of the loaded text in units of bytes.
static bool validate(int year, int month, int day)
Validates a date by means of its year, month and day (of the month).
const Value::Time & value_time() const
Short name alias for value<Value::Time>() const.
virtual Result record_lock_id(long long int id, Locking locking=Locking::LOCK_EXCLUSIVE) const =0
Applies a locking to a record by means of its id.
static int days_in_month(int year, int month)
Gets the days in a month.
bool operator<=(const Time &other) const
Gets if the time is equal to or earlier than another time.
Transaction(Database &database)
Constructs and starts a transaction.
virtual int depth() const =0
Gets the depth of the transactions.
void clear()
Empties the flags.
Definition: Flags.hpp:128
@ FUNCTION_INEXISTENT
Function inexistent.
virtual Subrecord * get_if_existent(int table_number, int number) const =0
Gets a subrecord by means of the number of the table and the number of the subrecord,...
@ SELECTIONS_SORT_DIFFERENT
Sort of selections different.
@ VALUE_OVERFLOW
Value overflow occurred.
bool loaded() const
Gets if a binary is loaded into the binary buffer.
Exception caused by invalidity.
Definition: Exception.hpp:75
std::function< void(Status status, long long int record_id_processed_last, long int key_entries_processed, long int records_defective, long int key_entry_collisions, bool &abort) > Callback
Callback of a reorganization of a key.
Definition: Key.hpp:111
long long int storage_id() const
Gets the storage id of the loaded binary object.
@ DATA_LIMIT_EXCEEDED
Data limit exceeded.
Result write() const override
Writes the loaded binary.
Output stream for writing texts.
Definition: Text.hpp:945
@ MISSING_END_OF_COMMENT
Missing end of comment.
@ UNKNOWN_NAME
Unknown name.
void arguments_add(Arguments &&... arguments)
Adds multiple arguments to the execution.
Definition: Procedure.hpp:250
virtual Database & database() const =0
Gets the database of the field.
@ OTHER
Other error occurred.
Result read_link(const Record &record_source, int link_number, Place place, Locking locking=Locking::NONE, bool reverse=false)
Reads a record by means of a link and a place into the record buffer.
Date date() const
Gets the date of the moment.
@ DATABASE_LOCKED_STANDBY
Database locked (Database in standby mode).
void clear()
Empties the date.
@ VALUE_LOGIC
Variant holds a Value::Logic.
const Array< Value::Byte > & array_byte() const
Short name alias for array<Value::Byte>() const.
const Value::Logic & value_logic() const
Short name alias for value<Value::Logic>() const.
@ VALUE_BIGINT
Variant holds a Value::Bigint.
const std::string & personal_user() const
Gets the user who set the loaded text to private.
@ NONE
Variant holds nothing.
Space space() const
Gets the space of the variant.
long long int size() const
Gets the size of the loaded binary object in units of bytes.
virtual int length() const =0
Gets the length of the field.
virtual C16::Field::Collation collation() const =0
Gets the collation of the field.
StreamBufferOutput()
Constructs an output stream buffer.
Inexistence(const std::string &what)
Constructs an exception.
int hours() const
Gets the hours of the time.
@ UNLOCK
Removes a lock applied by the accessing user from the entity.
State state() const
Gets the state of the transaction.
Key of a table.
Definition: Key.hpp:17
bool operator!=(const Time &other) const
Gets if the time is unequal to another time.
bool operator<=(const IteratorConst &other) const
Gets if the iterator is lower than or equal to another iterator.
const Value::Alpha & value_alpha_const() const
Short name alias for value<Value::Alpha>() const.
int week() const
Gets the week (according to ISO 8601) of the date.
@ COMMITTED
Transaction was commited.
Namespace.
Definition: Array.hpp:6
bool empty() const
Gets if the moment is empty.
bool operator<=(const Date &other) const
Gets if the date is equal to or earlier than another date.
virtual const Series< Field > & fields() const =0
Gets the fields of the subrecord.
const Array< Value::Logic > & array_logic() const
Short name alias for array<Value::Logic>() const.
@ PROCEDURE_CALL_OLD
Old procedure (A-) called.
virtual const std::string & name() const =0
Gets the name of the subrecord.
long long int login_duration() const
Gets the duration since the login of the loaded user to the database in units of seconds.
int day_of_year() const
Gets the day of the year of the date.
const Value::Int & value_int() const
Short name alias for value<Value::Int>() const.
Field buffer of a record buffer.
Definition: Record.hpp:1115
virtual void dissociate()=0
Dissociates an associated text buffer from the stream buffer.
@ STRING_LENGTH_EXCEEDED
String length exceeded.
@ OK
Reorganization succeeded.
const Array< Value > & array() const
Gets the holded array of the variant.
@ MEDIUM
Medium compression.
Error
Error of the execution of a procedure.
Definition: Procedure.hpp:288
const std::string & name() const
Gets the name of the loaded user.
@ ARRAY_BIGINT
Variant holds an Array<Value::Bigint>.
difference_type operator-(const IteratorGeneric &other) const
Gets the difference to another iterator.
Type type() const
Gets the type of the variant.
const Database & database() const
Gets the database of the record buffer.
Array of elements.
Definition: Array.hpp:177
IteratorConst & operator++()
Increments the iterator.
std::string content(LineBreak line_break=LineBreak::LF) const
Gets the content of the loaded text.
void personal_set(bool personal)
Sets if the loaded text is private.
virtual Database & database() const =0
Gets the database of the subrecords.
@ ARRAY
Variant holds an Array.
virtual const Record & record() const =0
Gets the record buffer of the field buffer.
virtual Field & get(int subrecord_number, int number) const =0
Gets a field by means of the number of the subrecord and the number of the field.
@ SERVER_BUSY
Server busy.
virtual int right_input() const =0
Gets the right required by a user to input the field.
Exception caused by inexistence.
Definition: Exception.hpp:95
long long int storage_consumption() const
Gets the storage consumption of the loaded binary object in units of bytes.
int right_execute() const
Gets the right required by a user to execute the loaded selection.
bool operator>=(const Time &other) const
Gets if the time is equal to or later than another time.
@ ARRAY_LOGIC
Variant holds an Array<Value::Logic>.
@ ARRAY_INDEX_INVALID
Array index invalid.
void unload() override
Unloads the loaded binary.
Internal(int code=-1)
Constructs an internal exception.
Selection buffer to operate on selections of a table.
Definition: Selection.hpp:57
long int line_count() const
Gets the line count of the loaded text.
const Variant & execute()
Executes the execution.
Status
Status of a diagnosis of a database.
Definition: Database.hpp:338
long int count() const override
Gets the count of records of the record set.
virtual const Link * get_if_existent(int table_number, int number) const =0
Gets a link by means of the number of the table and the number of the link, if existent.
std::string error_text
Error text of the result.
Definition: Procedure.hpp:704
long long int id() const
Gets the id of the loaded record.
bool operator>=(const IteratorConst &other) const
Gets if the iterator is greater than or equal to another iterator.
std::int64_t Bigint
Integer number (signed, 64 bits).
Definition: Native.hpp:26
const Keys & keys() const
Gets the keys of the database.
const Value::Time & value_time_const() const
Short name alias for value<Value::Time>() const.
const_reference operator[](size_type index) const
Gets an element of the array by means of its index.
@ OPERATION_UNAVAILABLE
Operation unavailable.
@ ARRAY_TIME
Variant holds an Array<Value::Time>.
IteratorConst rend() const noexcept
Gets a const-iterator of the element preceding the first element of the array.
virtual const std::string & name() const =0
Gets the name of the table.
Field of a table.
Definition: Field.hpp:16
bool loaded() const
Gets if a selection is loaded into the selection buffer.
const Array< Value > & array_const() const
Gets the holded array of the variant.
Type
Type of a value.
Definition: Type.hpp:12
const Value::Int & value_int_const() const
Short name alias for value<Value::Int>() const.
@ NO_REC
Entity inexistent.
static const int YEAR_MAXIMUM
Maximum year of a moment.
Definition: Moment.hpp:33
Table of a database.
Definition: Table.hpp:21
void created_user_set(const std::string &user)
Sets the user who created the loaded binary object.
long long int id() const
Gets the id of the loaded binary.
Subrecord of a table.
Definition: Subrecord.hpp:16
Time time() const
Gets the time of the moment.
Result erase_object(const std::string &path) const
Deletes a binary object within the loaded binary directory.
const Element & reference
Type of a reference to an element of the iterator.
Definition: Array.hpp:276
@ NUL
Null character (ASCII: 0, 0x0)
virtual Database & database() const =0
Gets the database of the link.
@ MISSING_LOOP
Missing LOOP.
ErrorLanguage
Error language of a compilation of a procedure.
Definition: Procedure.hpp:533
Exception of a connection to a database.
Definition: Database.hpp:105
virtual Procedure::Compilation::Result compile_result(const std::string &name, Procedure::Compilation::ErrorLanguage error_language=Procedure::Compilation::ErrorLanguage::ENGLISH_US) const =0
Compiles a procedure and gets its result.
Compilation::Error compile() const
Compiles the procedure and gets its error.
virtual Result copy(const std::string &name, const std::string &name_copy)=0
Copies a text.
@ DEADLOCK
Deadlock occurred.
int code() const
Gets the code of the internal exception.
bool operator>(const Time &other) const
Gets if the time is later than another time.
virtual void records_erase() const =0
Deletes the records of the table.
static const Flags< Enumeration > EMPTY
Empty flags.
Definition: Flags.hpp:26
int minutes() const
Gets the minutes of the moment since the last hour.
Users of a database.
Definition: Users.hpp:12
long int nanoseconds() const
Gets the nanoseconds of the moment since the last second.