Commit Graph

  • e026af9994
    add QT Creator files to .gitignore master Tomasz Sowa 2023-10-22 23:37:44 +0200
  • 92d9d2c01b
    add Finder::esc_like(...) methods Tomasz Sowa 2023-10-10 19:43:02 +0200
  • 8200092524
    add Finder::raw(pt::Date&,...) and esc(pt::Date &,...) methods Tomasz Sowa 2023-07-17 03:42:14 +0200
  • 21f12a8a98
    add support for declared cursors Tomasz Sowa 2023-07-16 04:03:03 +0200
  • 6619f3ecb5
    fix: correctly use a table name when using Finder::use_table_prefix(true) Tomasz Sowa 2023-07-15 03:08:02 +0200
  • e7c62e35dc
    add Finder::is_null() and is_not_null() methods Tomasz Sowa 2023-07-08 23:26:54 +0200
  • 25a91168ac
    fix: correctly use a table name when a Select::no_auto_generated_columns flag is used Tomasz Sowa 2023-05-08 10:26:31 +0200
  • 86177889af
    add a CSVConnector/CSVExpression classes to serialize to csv format Tomasz Sowa 2023-04-12 17:20:29 +0200
  • d61fc31b5c
    allow to set a custom name for the auto generated rows counter column Tomasz Sowa 2023-02-28 09:51:05 +0100
  • c56bae57ca
    fix: propagate the model_data in the cursor Tomasz Sowa 2023-02-28 09:48:44 +0100
  • 1821c562f7
    add a Select::distinct flag Tomasz Sowa 2023-02-28 03:37:20 +0100
  • dee48ea2b5
    use an <item> field when serializing a table to xml Tomasz Sowa 2023-02-27 00:29:51 +0100
  • cf377204a9
    improve the xml serializer Tomasz Sowa 2023-02-26 22:19:46 +0100
  • 0fbd988eda
    serialize a model to flat string even when a DO_NOTHING_ON_SAVE flag is set Tomasz Sowa 2023-02-26 18:28:16 +0100
  • d1c86c84cf fix: allow to use a minus sign in strings with FT::numeric flag Tomasz Sowa 2023-01-11 23:06:27 +0100
  • 794051fa15 add basic support for serializing objects to xml Tomasz Sowa 2022-12-16 02:48:07 +0100
  • a3c337355d fix: correctly read a date from a database if a date_only flag is set Tomasz Sowa 2022-12-15 17:33:46 +0100
  • a4a1acebeb add Finder::like(...) and ilike(...) methods Tomasz Sowa 2022-12-05 06:36:13 +0100
  • dfc631dd06 add more Finder::esc(...) and raw(...) methods Tomasz Sowa 2022-12-02 13:26:30 +0100
  • 2ac8769d3a add Finder::esc(...) methods Tomasz Sowa 2022-12-02 11:45:19 +0100
  • 7f4deaf847 update to the new pikotools api: change converting functions to the snake case Tomasz Sowa 2022-11-14 03:38:27 +0100
  • 0ce05850b3 add FT::date_only, FT::time_only and FT::no_time_zone flags Tomasz Sowa 2022-10-22 16:29:40 +0200
  • 38e790c2ac fix: correctly delete child objects - use the original value from save_mode Tomasz Sowa 2022-08-17 07:43:58 +0200
  • bc92654be9 let Finder::page() takes a page number and not an offset Tomasz Sowa 2022-08-04 14:54:04 +0200
  • c54a5bed05 add Model::get_logger() Tomasz Sowa 2022-08-01 03:58:07 +0200
  • 8373f9e9d8 make depend Tomasz Sowa 2022-07-30 03:32:33 +0200
  • 43dfbd5d5a add possibility of calculating how many rows there were before LIMIT was applied Tomasz Sowa 2022-07-11 17:48:13 +0200
  • 4e8f3af8fc (finder): take pt::TextStream by const ref in raw(...) method Tomasz Sowa 2022-07-08 22:02:02 +0200
  • 128f43482a make depend Tomasz Sowa 2022-07-05 19:48:17 +0200
  • 3ddeb78c97 add LICENSE file Tomasz Sowa 2022-07-03 11:01:14 +0200
  • ea6f9fd13e remove empty src/outstream.h file Tomasz Sowa 2022-06-30 13:30:06 +0200
  • 1ad3d89d52 change headerfile_morm_* macros to headerfile_morm_src_* Tomasz Sowa 2022-06-30 13:28:38 +0200
  • 576d537177 add src/version.h with macros: MORM_VERSION_MAJOR, MORM_VERSION_MINOR, MORM_VERSION_PATCH Tomasz Sowa 2022-06-30 13:19:55 +0200
  • c89d4f76bc add global Makefile Tomasz Sowa 2022-06-26 06:15:19 +0200
  • 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 Sowa 2022-06-25 18:30:53 +0200
  • 1ace47266d fix: correctly escape output stream buffer for models getters Tomasz Sowa 2022-05-31 01:45:27 +0200
  • 21117e24c0 do Transaction::commit/rollback only on the same group for which a begin was called Tomasz Sowa 2022-05-27 00:06:56 +0200
  • dd04ee84b7 capitalize INSERT/UPDATE/DELETE sql statements Tomasz Sowa 2022-05-26 20:19:05 +0200
  • 1d4de8abe2 add support for nested transactions Tomasz Sowa 2022-05-26 20:14:14 +0200
  • 907f10671d do not allow to copy/move transactions objects Tomasz Sowa 2022-05-26 00:45:49 +0200
  • c5cf4a2672 add Transaction class as a wrapper for transactions Tomasz Sowa 2022-05-26 00:34:17 +0200
  • b32917afe7 use pikotools Log::put_multiline() method when printing PostgreSQL error messages Tomasz Sowa 2022-05-25 19:58:13 +0200
  • 0ce7578de3 fix: the way how we test if there is a connection issue Tomasz Sowa 2022-05-25 19:11:42 +0200
  • 12232bf722 propagate status from childs in Model::insert, Model::update, Model::remove and Model::save Tomasz Sowa 2022-05-24 23:27:07 +0200
  • 1ad4cb4fbd trim white lines after PostgreSQL error message Tomasz Sowa 2022-05-24 20:06:06 +0200
  • 56cbebad4f add FT::numeric to be applied on string types Tomasz Sowa 2022-05-16 13:42:51 +0200
  • 3bde64e033 add possibility to set save status for the whole tree Tomasz Sowa 2022-05-12 00:21:42 +0200
  • df44296c04 fix: only insert primary keys from the first descendant childs Tomasz Sowa 2022-05-11 23:18:25 +0200
  • 469294502e allow specify how many times we can try to connect to the database Tomasz Sowa 2022-04-29 05:56:02 +0200
  • d384929e75 allow to use host connection parameter Tomasz Sowa 2022-04-28 06:03:40 +0200
  • ac77abb8fd allow to use hostaddr, port or conn_string to connect to PostgreSQL Tomasz Sowa 2022-04-20 18:36:06 +0200
  • 0bdabfc7b4 fix: put 'char' type directly to the output stream Tomasz Sowa 2022-02-08 12:47:34 +0100
  • 48d515ea64 if pt::Space has FT::json type then let JSONExpression serialize it as json and not string Tomasz Sowa 2022-02-03 11:18:01 +0100
  • 758bd4909f ModelContainerWrapper: added size() method ezc_types Tomasz Sowa 2021-11-24 13:20:25 +0100
  • 330d945130 SpaceWrapper: last_for_loop_status has been removed Tomasz Sowa 2021-11-23 19:43:56 +0100
  • c14b0eb626 removed Wrapper class Tomasz Sowa 2021-11-22 15:45:44 +0100
  • 4a8fa0c34c removed MORM_MODEL_WORK_MODE_GET_MODEL_WRAPPER removed Model::get_wrapper(...) method Tomasz Sowa 2021-11-21 21:10:16 +0100
  • 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 Sowa 2021-11-08 00:43:01 +0100
  • f66f5b321c changed name: fun_info -> env Tomasz Sowa 2021-11-05 22:23:54 +0100
  • 318d9d447f Merge branch 'ezc_types' of ssh://gitea.ttmath.org:2299/tomasz.sowa/morm into ezc_types Tomasz Sowa 2021-11-05 09:44:14 +0100
  • 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 Sowa 2021-11-05 09:40:16 +0100
  • 5328465e5e Model::get_raw_value: changed parameter: fun_info -> env Tomasz Sowa 2021-10-27 14:24:48 +0200
  • df1bb0e56d Model::get_raw_value(...) method do not get pt::Stream& now, only Ezc::Env<>& Tomasz Sowa 2021-10-20 08:29:38 +0200
  • c25a5d2215 - code from JSONExpression::esc(char val, ...) moved to Pikotools (convert/misc.h) - added ModelContainerWrapper::set_iterator_at_first_model() method Tomasz Sowa 2021-10-12 19:59:19 +0200
  • 0fff26bf2f start working on types for ezc library (types branch): Ezc::FunInfo<> renamed to Ezc::Env<> Tomasz Sowa 2021-09-08 15:34:40 +0200
  • e682e057ad added to SpaceWrapper class: void invalidate_iterators(size_t space_index_start) Tomasz Sowa 2021-08-13 21:43:02 +0200
  • f94a9e27db added flags FT::json and FT::space for pt::Space class - serializing/parsing to/from json/space Tomasz Sowa 2021-08-12 21:56:32 +0200
  • d162ca13bb fixed: in Model::add_field_for_select(...) there was a table name added Tomasz Sowa 2021-07-07 01:06:01 +0200
  • f4d92bec5d added clearing of existing objects in Wrapper::operator=(...) Tomasz Sowa 2021-07-01 23:22:49 +0200
  • 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 Sowa 2021-07-01 22:55:56 +0200
  • 84fd351bfc fixed: in BaseExpression::put_field_value_list_model() model_env_local.model pointer was not set to the child object Tomasz Sowa 2021-07-01 22:39:50 +0200
  • 097c09b9e3 added to Model: virtual bool db_query(const char ** raw_sql, size_t len); Tomasz Sowa 2021-06-27 22:43:10 +0200
  • e35a1d09a5 added ModelWrapper::space_indices_table_size() method Tomasz Sowa 2021-06-25 16:18:06 +0200
  • 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 Sowa 2021-06-24 21:14:29 +0200
  • 86bf9cf688 added ModelWrapperSpace for wrapping the pt::Space class Tomasz Sowa 2021-06-22 17:59:44 +0200
  • e74575db42 fixed: in ModelWrapper::clear_childs() childs_map.clear() was called in the loop, should be at the end Tomasz Sowa 2021-06-22 11:59:11 +0200
  • 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 Sowa 2021-06-20 17:49:54 +0200
  • aba454a4bf methods Model::get_raw_value(...) now returns boolean - true if a field was found Tomasz Sowa 2021-06-19 20:25:38 +0200
  • 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 Sowa 2021-06-18 19:05:50 +0200
  • 5cf55ecce3 added basic support for containers with pointers to models Tomasz Sowa 2021-06-17 21:31:58 +0200
  • 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 Sowa 2021-06-16 22:23:30 +0200
  • d8f7216a73 added .editorconfig file Tomasz Sowa 2021-06-16 14:21:34 +0200
  • aeb02f82b1 changed the way how we get a specific field value - now we do not use expressions (BaseExpression), to get the raw value we don't need an expression object: - removed MORM_WORK_MODE_GET_SPECIFIC_FIELD_VALUE from expression work mode - removed: void BaseExpression::field(const wchar_t * field_name, void (Model::*getter_method)(pt::TextStream &), const FT & field_type, ModelEnv * model_env) - removed from BaseExpression: template<typename FunInfoStreamType> void field(const wchar_t * field_name, void (Model::*fun)(Ezc::FunInfo<FunInfoStreamType> &), const FT & field_type, ModelEnv * model_env) - removed: void FlatConnector::to_text(const wchar_t * flat_field_name, pt::TextStream & stream, Model & model) - renamed/changed: Model::put_field_value(...) -> Model::get_raw_value() Tomasz Sowa 2021-06-16 14:01:07 +0200
  • dd01fafa40 - added support for calling member functions (setters/getters) from Models those functions can be used with databases and flat files - removed support for calling static function - if MORM_HAS_EZC_LIBRARY macro is defined then we can call a function which has a first argument Ezc::FunInfo<>& object (only for generating flat files) Tomasz Sowa 2021-06-01 19:34:34 +0200
  • 515e806a50 start adding support for Ezc library - Ezc::Generator is able to get variable value and call a static function Tomasz Sowa 2021-05-31 18:40:28 +0200
  • 284cbc5c66 Merge pull request 'winix_fullmorm' (#4) from winix_fullmorm into master Tomasz Sowa 2021-05-27 10:49:46 +0200
  • 2f72bd29ec fixed: has_primary_key_set was always set to false in Model::insert() and this prevented to insert a model which had a primary key set by hand Tomasz Sowa 2021-05-21 22:36:04 +0200
  • e0e3465673 fixed: such field types: no_insertable, no_updatable were not taken into account on Model child objects added: field type: no_removable - it is used only with child Models objects Tomasz Sowa 2021-05-21 22:12:10 +0200
  • fcd2c4775b updated to the new pikotools api: snake_case names of methods from SpaceParser Tomasz Sowa 2021-05-21 04:51:12 +0200
  • 9598cc4def updated to the new pikotools api: SpaceParser::SetSpace(...) methods have been removed Tomasz Sowa 2021-05-21 01:35:16 +0200
  • 0ff900f626 updated to the new pikotools api: changed utf8 functions PascalCase to snake_case Tomasz Sowa 2021-05-21 00:32:29 +0200
  • 34274ca230 namespace PT renamed to pt Tomasz Sowa 2021-05-20 16:25:01 +0200
  • b12037a7e5 added basic support for making migrations Tomasz Sowa 2021-05-14 03:24:53 +0200
  • de4abeb91c added to Finder: methods eq() and similar with table_name as an argument Finder<ModelClass> & eq(const wchar_t * table_name, const wchar_t * field_name, const FieldValue & field_value) Finder<ModelClass> & eq(const wchar_t * table_name, int table_index, const wchar_t * field_name, const FieldValue & field_value) and similar for neq(), lt(), gt(), le(), ge() and in() Tomasz Sowa 2021-05-13 19:32:31 +0200
  • 6eaa9088e5 renamed in Model: map_fields() to fields(), prepare_table() to table() Tomasz Sowa 2021-05-13 03:27:21 +0200
  • 2ad6c8c258 changed the way how to quote schemas, tables and field names, added escaping table names in insert/update/remove Tomasz Sowa 2021-05-13 02:32:03 +0200
  • a1537cf8d5 BaseExpression: removed methods: put_long_field_name() and put_short_field_name() now method put_field_name() is not making a test whether field_name is in long format and only puts the field name (without table name), this allows us to have a dot in the column name (field_name) Tomasz Sowa 2021-05-13 00:19:22 +0200
  • 179be2864f change FT field_type in PostgreSQLConnector Tomasz Sowa 2021-05-12 05:39:31 +0200
  • aadc5be350 FT field_type changed to const FT & field_type in functions arguments Tomasz Sowa 2021-05-12 04:53:23 +0200
  • c7797ff2f1 fixed #2: escape tables/columns names in Finder left join queries some methods moved from model.h to model.cpp and from baseexpression.h to baseexpression.cpp Tomasz Sowa 2021-05-12 00:27:35 +0200