fc50c8ca5e
fixed: in Finder::select(PT::TextStream & out_stream, ModelConnector & model_connector) and Finder::select(PT::TextStream & out_stream, ModelConnector * model_connector) there was 'out_stream' parameter ignored
Tomasz Sowa2022-06-25 18:30:53 +02:00
1ace47266d
fix: correctly escape output stream buffer for models getters
Tomasz Sowa2022-05-31 01:45:27 +02:00
21117e24c0
do Transaction::commit/rollback only on the same group for which a begin was called
Tomasz Sowa2022-05-27 00:06:56 +02:00
dd04ee84b7
capitalize INSERT/UPDATE/DELETE sql statements
Tomasz Sowa2022-05-26 20:19:05 +02:00
1d4de8abe2
add support for nested transactions
Tomasz Sowa2022-05-26 20:14:14 +02:00
907f10671d
do not allow to copy/move transactions objects
Tomasz Sowa2022-05-26 00:45:49 +02:00
c5cf4a2672
add Transaction class as a wrapper for transactions
Tomasz Sowa2022-05-26 00:34:17 +02:00
b32917afe7
use pikotools Log::put_multiline() method when printing PostgreSQL error messages
Tomasz Sowa2022-05-25 19:58:13 +02:00
0ce7578de3
fix: the way how we test if there is a connection issue
Tomasz Sowa2022-05-25 19:11:42 +02:00
12232bf722
propagate status from childs in Model::insert, Model::update, Model::remove and Model::save
Tomasz Sowa2022-05-24 23:27:07 +02:00
1ad4cb4fbd
trim white lines after PostgreSQL error message
Tomasz Sowa2022-05-24 20:06:06 +02:00
56cbebad4f
add FT::numeric to be applied on string types
Tomasz Sowa2022-05-16 13:42:51 +02:00
3bde64e033
add possibility to set save status for the whole tree
Tomasz Sowa2022-05-12 00:21:42 +02:00
df44296c04
fix: only insert primary keys from the first descendant childs
Tomasz Sowa2022-05-11 23:18:25 +02:00
469294502e
allow specify how many times we can try to connect to the database
Tomasz Sowa2022-04-29 05:56:02 +02:00
d384929e75
allow to use host connection parameter
Tomasz Sowa2022-04-28 06:03:40 +02:00
ac77abb8fd
allow to use hostaddr, port or conn_string to connect to PostgreSQL
Tomasz Sowa2022-04-20 18:36:06 +02:00
0bdabfc7b4
fix: put 'char' type directly to the output stream
Tomasz Sowa2022-02-08 12:47:34 +01:00
48d515ea64
if pt::Space has FT::json type then let JSONExpression serialize it as json and not string
Tomasz Sowa2022-02-03 11:18:01 +01:00
4a8fa0c34c
removed MORM_MODEL_WORK_MODE_GET_MODEL_WRAPPER removed Model::get_wrapper(...) method
Tomasz Sowa2021-11-21 21:10:16 +01:00
b9990e3b8c
use MORM_MODEL_WORK_MODE_PUT_FIELD_RAW_VALUE_TO_STREAM instead of MORM_MODEL_WORK_MODE_GET_MODEL_WRAPPER when iterating through models containers
Tomasz Sowa2021-11-08 00:43:01 +01:00
318d9d447f
Merge branch 'ezc_types' of ssh://gitea.ttmath.org:2299/tomasz.sowa/morm into ezc_types
Tomasz Sowa2021-11-05 09:44:14 +01:00
4ba0f7133b
remove field(...) methods with void (ClassName::*method)(morm::Wrapper &) arguments use new variables: ezc_var_space_local and ezc_var_date from ModelEnv
Tomasz Sowa2021-11-05 09:40:16 +01:00
df1bb0e56d
Model::get_raw_value(...) method do not get pt::Stream& now, only Ezc::Env<>&
Tomasz Sowa2021-10-20 08:29:38 +02:00
c25a5d2215
- code from JSONExpression::esc(char val, ...) moved to Pikotools (convert/misc.h) - added ModelContainerWrapper::set_iterator_at_first_model() method
Tomasz Sowa2021-10-12 19:59:19 +02:00
0fff26bf2f
start working on types for ezc library (types branch): Ezc::FunInfo<> renamed to Ezc::Env<>
Tomasz Sowa2021-09-08 15:34:40 +02:00
e682e057ad
added to SpaceWrapper class: void invalidate_iterators(size_t space_index_start)
Tomasz Sowa2021-08-13 21:43:02 +02:00
f94a9e27db
added flags FT::json and FT::space for pt::Space class - serializing/parsing to/from json/space
Tomasz Sowa2021-08-12 21:56:32 +02:00
d162ca13bb
fixed: in Model::add_field_for_select(...) there was a table name added
Tomasz Sowa2021-07-07 01:06:01 +02:00
f4d92bec5d
added clearing of existing objects in Wrapper::operator=(...)
Tomasz Sowa2021-07-01 23:22:49 +02:00
dc6c70499c
added: Wrapper class as a wrapper for: a model, model container (list/vector), Space or Date added BaseObjectWrapper as base class for: SpaceWrapper and ModelContainerWrapper removed: ModelWrapperModel, now one Model doesn't need a wrapper renamed: ModelWrapperSpace -> SpaceWrapper, now as a base class it has BaseObjectWrapper renamed: Model::get_model_wrapper() -> Model::get_wrapper() - now it returns Wrapper object removed logging from Model::get_model() and Model::get_wrapper() field() methods don't take ModelWrapper** but Wrapper& now
Tomasz Sowa2021-07-01 22:55:56 +02:00
84fd351bfc
fixed: in BaseExpression::put_field_value_list_model() model_env_local.model pointer was not set to the child object
Tomasz Sowa2021-07-01 22:39:50 +02:00
097c09b9e3
added to Model: virtual bool db_query(const char ** raw_sql, size_t len);
Tomasz Sowa2021-06-27 22:43:10 +02:00
e35a1d09a5
added ModelWrapper::space_indices_table_size() method
Tomasz Sowa2021-06-25 16:18:06 +02:00
89148de66d
updated samples - pikotools is in src subdirectory now - map_fields() -> fields() - prepare_table() -> table() - instead of pt::MainSpaceParser we have pt::MainOptionsParser now
Tomasz Sowa2021-06-24 21:14:29 +02:00
86bf9cf688
added ModelWrapperSpace for wrapping the pt::Space class
Tomasz Sowa2021-06-22 17:59:44 +02:00
e74575db42
fixed: in ModelWrapper::clear_childs() childs_map.clear() was called in the loop, should be at the end
Tomasz Sowa2021-06-22 11:59:11 +02:00
a8fe798279
fixed: getters method (Model::*getter_method)(pt::Stream &) produced boolean value when serializing to flat string - changed in Model::field_list_generic(...): message "you should set FT::is_foreign_key or FT::is_foreign_key_in_child flag" print only for work mode MORM_MODEL_WORK_MODE_SET_PARENT_ID or MORM_MODEL_WORK_MODE_ITERATE_THROUGH_CHILDS_WITHOUT_FOREIGN_KEY - pt::TextStream::to_string(...) is now pt::TextStream::to_str(...) - in Model::get_raw_value() for ezc 'pt::TextStream & stream' changed to 'pt::Stream & stream' (a base class of pt::TextStream) similar in field(...) methods which take getters: void (Model::*getter_method)(pt::TextStream &) -> void (Model::*getter_method)(pt::Stream &)
Tomasz Sowa2021-06-20 17:49:54 +02:00
aba454a4bf
methods Model::get_raw_value(...) now returns boolean - true if a field was found
Tomasz Sowa2021-06-19 20:25:38 +02:00
9a142548d0
fixed in Model::field_generic_put_raw_value_to_stream() - a boolean status for ezc was not set added to Model: - method field() which can take a pointer to a member which returns bool: void field(const wchar_t * field_name, bool (ClassName::*method)(), const morm::FT & field_type = morm::FT::default_type) - method field() which can take a pointer to a member which can set morm::ModelWrapper object void field(const wchar_t * field_name, void (ClassName::*method)(morm::ModelWrapper **), const morm::FT & field_type = morm::FT::default_type) - methods: bool Model::convert_to_bool(...) - they are used for creating a result for ezc from local fields
Tomasz Sowa2021-06-18 19:05:50 +02:00
5cf55ecce3
added basic support for containers with pointers to models
Tomasz Sowa2021-06-17 21:31:58 +02:00
dc1c601eac
in Model: added a test whether Model is a base class of ContainerItemType (list/vector) when doing MORM_MODEL_WORK_MODE_GET_MODEL_WRAPPER
Tomasz Sowa2021-06-16 22:23:30 +02:00