ViewVC Help
View Directory | Revision Log | View Changeset | Root Listing
root/publicrep/morm
Sticky Revision:
Sort logs by:
Revision 1230 - Directory Listing
Modified Fri Nov 22 13:40:30 2019 UTC (9 months, 4 weeks ago) by tomek
added comments to PostgreSQLQueryResult::get_value_from_result():
 * in the future we can use single row mode:
 * https://www.postgresql.org/docs/10/libpq-single-row-mode.html
 *
 * or just cursors from database:
 * https://www.postgresql.org/docs/current/sql-fetch.html



Revision 1222 - Directory Listing
Modified Thu Sep 26 17:15:00 2019 UTC (11 months, 3 weeks ago) by tomek
fixed: Finder didn't use ModelData structure when creating the select query
       ModelData structure was used only later in Cursor
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



Revision 1221 - Directory Listing
Modified Thu Sep 26 12:23:07 2019 UTC (11 months, 3 weeks ago) by tomek
creating branches/stable-2019-03-29 branch from revision 1181 from trunk


Revision 1220 - Directory Listing
Modified Wed Sep 25 17:21:12 2019 UTC (11 months, 3 weeks ago) by tomek
added some comments (what to do)


Revision 1217 - Directory Listing
Modified Wed Sep 25 16:20:37 2019 UTC (11 months, 3 weeks ago) by tomek
fixed: in Model::remove(ModelData & model_data, bool remove_whole_tree) we didn't use remove_whole_tree parameter
fixed: compilation erorr when inserting/updating a Model object which has child lists without Model objects such as std::list<int>
added: to Model: methods insert, update, remove and save with one argument: bool save_whole_tree



Revision 1215 - Directory Listing
Modified Tue Sep 24 17:08:45 2019 UTC (11 months, 3 weeks ago) by tomek
fixed: a parent key was not properly set to simple childs (insert statements)
fixed: a parent key was not set in list of childs (insert statements)



Revision 1214 - Directory Listing
Modified Tue Sep 24 11:09:11 2019 UTC (11 months, 3 weeks ago) by tomek
added support for UPDATE, INSERT and REMOVE for lists childs
(need some testing)



Revision 1213 - Directory Listing
Modified Wed Sep 18 15:55:42 2019 UTC (12 months ago) by tomek
removed: doc functionality (generating documentation from a model)
         we can use our own class (based on FlatConnector and FlatExpression) to generate documentation



Revision 1212 - Directory Listing
Modified Wed Sep 18 15:28:06 2019 UTC (12 months ago) by tomek
refactoring: ModelEnv::model_connector_mode renamed to model_work_mode
             ModelEnv::model_connector_submode renamed to model_work_submode
             and similarly macros MORM_MODEL_CONNECTOR_MODE.* -> MORM_MODEL_WORK_MODE_*
	     MORM_MODEL_CONNECTOR_SUBMODE.* -> MORM_MODEL_WORK_SUBMODE_*


Revision 1211 - Directory Listing
Modified Wed Sep 18 14:36:13 2019 UTC (12 months ago) by tomek
rafactoring in Model class (in field_generic and field_model methods)
added: ModelEnv::model_connector_submode (used in iterating through childs)



Revision 1210 - Directory Listing
Modified Wed Sep 18 12:29:20 2019 UTC (12 months ago) by tomek
fixed: in 'left join' statements there were not table indices used
added: now we set flag save_mode = DO_NOTHING_ON_SAVE for objects for which
       all fields from a database result set are null


Revision 1209 - Directory Listing
Modified Tue Sep 17 17:55:39 2019 UTC (12 months ago) by tomek
fixed: get_value_by_field_name() is able to correctly take values when 
       we do not use auto generated 'select' and when we are using prefixes for columns


Revision 1208 - Directory Listing
Modified Fri Sep 13 18:17:02 2019 UTC (12 months ago) by tomek
added:   to Model::to_text() methods added dump_mode (bool) parameter
         an additional field (model_save_mode) is printed
changed: if there is no an object the Cursor returns a Model with DO_NOTHING_ON_SAVE flag now
         (DO_INSERT_ON_SAVE was beforehand)
fixed:   when reading a result from db: for auto generated select there should be used
         get_value_by_field_index() method instead of get_value_by_field_name() 
changed: flat string (json) is generated only if a model has DO_INSERT_ON_SAVE
         or DO_UPDATE_ON_SAVE or is dump_mode turn on
         



Revision 1207 - Directory Listing
Modified Wed Sep 11 18:16:22 2019 UTC (12 months, 1 week ago) by tomek
changed: SetFieldValueHelper -> FieldValueHelper
         it's a much simpler structure now
removed: FieldValueBase and FieldValueContainer



Revision 1206 - Directory Listing
Modified Thu Sep 5 16:32:35 2019 UTC (12 months, 2 weeks ago) by tomek
added support in Model for removing the whole tree
(without lists/vectors at the moment yet)



Revision 1205 - Directory Listing
Modified Wed Sep 4 16:02:18 2019 UTC (12 months, 2 weeks ago) by tomek
now Model.update() and Model.insert() can update/insert the whole tree with child models
(at the moment without lists/vectors only model childs)


Revision 1204 - Directory Listing
Modified Thu Aug 22 18:33:35 2019 UTC (12 months, 4 weeks ago) by tomek
added: to Model: virtual void set_parent_key_in_childs()
       for setting a parent key id in child models,
       it is called after after_insert() method
added: SetFieldValueHelper class used for storing primary key values from a parent model



Revision 1203 - Directory Listing
Modified Wed Aug 21 17:42:50 2019 UTC (12 months, 4 weeks ago) by tomek
start adding support for inserting child models



Revision 1202 - Directory Listing
Modified Wed Aug 21 15:59:03 2019 UTC (12 months, 4 weeks ago) by tomek
added 'samples' directory for samples and tests


Revision 1201 - Directory Listing
Modified Wed Aug 21 12:15:55 2019 UTC (12 months, 4 weeks ago) by tomek
fixed: update/insert for child models generated an incorrect query (blocked for a while)


Revision 1200 - Directory Listing
Modified Tue Aug 20 15:49:37 2019 UTC (13 months ago) by tomek
fixed: in Model::generate_insert_query there was not ModelEnv set (was a null pointer)
       similarly in generate_update_query and generate_remove_query
added: support std::vector<> in Model::field() methods
added: serializing std::vector and std::list for non-model classes in BaseExpression



Revision 1196 - Directory Listing
Modified Sat Jul 20 18:04:37 2019 UTC (14 months ago) by tomek
merge from branches/join_models
(added possibility to fetch Model objects when they are used as a field in a Model class)



Revision 1195 - Directory Listing
Modified Mon Jun 17 10:59:39 2019 UTC (15 months ago) by tomek
fixed: in cursor in add_models_to_list(): added_model.model_env should be set after added_model.clear()
fixed: when generating: insert, update or remove statements we have used prefixes for columns
       but the table name was not set in ModelEnv (now we do not use prefixes in such statements)
changed: log_queries field moved from PostgreSQLConnector to DbConnector




Revision 1194 - Directory Listing
Modified Fri May 31 18:28:09 2019 UTC (15 months, 2 weeks ago) by tomek
added BaseExpression::is_long_field_name()
added BaseExpression::need_to_add_field_prefix()
      now the fields() methods don't take add_column_prefix parameter
      but the field_name (wchar_t*) is tested whether is it a long (with a period) or short name
added BaseExpression::save_foreign_key() (code moved from field())
removed some default method arguments from BaseExpression
added neq() method for Finder
added DbExpression::prepare_short_table_name(const PT::TextStream & table_name, PT::TextStream & short_table_name)



Revision 1193 - Directory Listing
Modified Tue May 21 17:24:12 2019 UTC (15 months, 4 weeks ago) by tomek
- removed prefix() method from Finder
  (this was for a custom prefix)
- removed column_prefix and column_prefix_index from BaseExpression
  now we have a pointer to ModelEnv passed in field() method
- to ModelEnv: added table_name, table_name_simple and table_index




Revision 1192 - Directory Listing
Modified Tue May 21 15:51:13 2019 UTC (16 months ago) by tomek
some work in branches/join_models
- added FinderHelper class - used as a global object for the whole model tree in Finder
  (some fields moved from ModelData)
- added CursorHelper class - used as a global object for the whole model tree in Cursor
  (some fields moved from ModelData)






Revision 1191 - Directory Listing
Modified Mon May 13 17:59:28 2019 UTC (16 months, 1 week ago) by tomek
some work in branches/join_models
added: ModelEnv class - now Model has a pointer to ModelEnv
       and ModelEnv has a pointer to ModelData, model_connector_mode, table_index and doc_field_pointer
       


Revision 1190 - Directory Listing
Modified Mon May 13 03:12:31 2019 UTC (16 months, 1 week ago) by tomek
some work in branches/join_models



Revision 1188 - Directory Listing
Modified Sun Mar 31 20:21:12 2019 UTC (17 months, 2 weeks ago) by tomek
fixed: generating a correct table names with indices for JOIN statements and column prefixes



Revision 1187 - Directory Listing
Modified Tue Mar 26 20:35:05 2019 UTC (17 months, 3 weeks ago) by tomek
some work: we need a different way of naming tables for joins


Revision 1186 - Directory Listing
Modified Tue Mar 26 18:34:07 2019 UTC (17 months, 3 weeks ago) by tomek
added: support for generating LEFT JOIN statement in Finder
       (the primary key should consist of only one column at the moment)


Revision 1185 - Directory Listing
Modified Tue Mar 26 18:22:21 2019 UTC (17 months, 3 weeks ago) by tomek
creating branch branches/join_models


Revision 1184 - Directory Listing
Modified Tue Mar 26 18:21:05 2019 UTC (17 months, 3 weeks ago) by tomek
creating morm/branches directory



Revision 1181 - Directory Listing
Modified Tue Mar 19 17:54:33 2019 UTC (18 months ago) by tomek
used PT::Log::logsave in postgresqlconnector in some places



Revision 1177 - Directory Listing
Modified Fri Mar 8 18:32:58 2019 UTC (18 months, 1 week ago) by tomek
fixed in Finder: in select(ModelConnector & model_connector) there was not an out_stream set



Revision 1175 - Directory Listing
Modified Thu Mar 7 18:02:29 2019 UTC (18 months, 2 weeks ago) by tomek
changed: ModelData moved outside Model
added:   using ModelData in BaseExpression so Model::to_text() functions can use a ModelData object now




Revision 1165 - Directory Listing
Modified Mon Jan 7 04:33:31 2019 UTC (20 months, 1 week ago) by tomek
Makefile.dep


Revision 1150 - Directory Listing
Modified Fri Nov 23 17:13:50 2018 UTC (21 months, 3 weeks ago) by tomek
updated to the new pikotools api
(Logger -> Log)



Revision 1142 - Directory Listing
Modified Thu Nov 15 08:50:10 2018 UTC (22 months ago) by tomek
changed: testing result status in do_query() in PostgreSQLConnector
renamed: some fields in QueryResult and PostgreSQLQueryResult



Revision 1140 - Directory Listing
Modified Wed Nov 14 17:14:26 2018 UTC (22 months ago) by tomek
added Cursor class


Revision 1131 - Directory Listing
Modified Wed Oct 24 16:28:19 2018 UTC (22 months, 3 weeks ago) by tomek
fixed: in Finder: we should set model_data to nullptr after fetching an object
       model_data points often to a local object (on the stack) so it would be incorrect
       to use it in the future


Revision 1124 - Directory Listing
Modified Sun Jul 15 22:36:04 2018 UTC (2 years, 2 months ago) by tomek
start working on generating documentation from a model


Revision 1122 - Directory Listing
Modified Thu Jul 5 11:15:16 2018 UTC (2 years, 2 months ago) by tomek
added: a new class Clearer with clear_value() methods moved from DbConnector


Revision 1121 - Directory Listing
Modified Thu Jul 5 09:51:26 2018 UTC (2 years, 2 months ago) by tomek
Model and BaseExpression: changed the template taking a container to std::list


Revision 1120 - Directory Listing
Modified Wed Jul 4 13:52:40 2018 UTC (2 years, 2 months ago) by tomek
removed: set_connector_for_childs from ModelConnector
changed: model connector is propagated to childs when needed
         (when update, insert, save, to_text is called or in finder)



Revision 1119 - Directory Listing
Modified Wed Jul 4 11:34:49 2018 UTC (2 years, 2 months ago) by tomek
changed: some methods from ModelConnector moved to Model



Revision 1118 - Directory Listing
Modified Tue Jul 3 16:55:06 2018 UTC (2 years, 2 months ago) by tomek
some work in morm
now in Model we have field() methods for other Model or std::list<Model>
(code not tested)



Revision 1107 - Directory Listing
Modified Wed May 2 12:55:00 2018 UTC (2 years, 4 months ago) by tomek
changed: don't use column prefix in add_field_for_select()


Revision 1106 - Directory Listing
Modified Tue May 1 23:22:32 2018 UTC (2 years, 4 months ago) by tomek
added: Finder::prefix() method
       code not thoroughly tested


Revision 1103 - Directory Listing
Modified Thu Apr 26 18:58:31 2018 UTC (2 years, 4 months ago) by tomek
added: field_model() method to Model




Revision 1098 - Directory Listing
Modified Mon Apr 23 19:02:38 2018 UTC (2 years, 4 months ago) by tomek
fixed: finder.get() didn't check whether the resultset had exactly one item



Revision 1097 - Directory Listing
Modified Mon Apr 23 15:46:21 2018 UTC (2 years, 4 months ago) by tomek
added support for PT::Logger to DbConnector and PostgreSQLConnector


Revision 1092 - Directory Listing
Modified Sun Apr 22 21:04:50 2018 UTC (2 years, 4 months ago) by tomek
added: Model::ModelData base class to use with Finder, Model.update(), Model.insert() and Model.remove()
added: Model.add_field_for_select() method 



Revision 1091 - Directory Listing
Modified Sun Apr 22 01:26:46 2018 UTC (2 years, 4 months ago) by tomek
added:
removing objects
saving objects (either insert or update or remove)




Revision 1090 - Directory Listing
Modified Fri Apr 20 09:41:41 2018 UTC (2 years, 5 months ago) by tomek
PT::Date is serializing in the form YYYY-MM-DDTHH:MM:SSZ (eg: 1990-02-12T13:05:39Z) to JSON



Revision 1088 - Directory Listing
Modified Thu Apr 19 15:21:51 2018 UTC (2 years, 5 months ago) by tomek
added: Model::get_connector_mode() method


Revision 1087 - Directory Listing
Modified Thu Apr 19 11:37:10 2018 UTC (2 years, 5 months ago) by tomek
poprawka: get_value() z postgresqlconnector zamienione na get_value_from_result()
w klasie bazowej mamy virtualne get_value() z innymi parametrami
(ostrze┼╝enie kompilatora)



Revision 1086 - Directory Listing
Modified Wed Apr 18 17:52:09 2018 UTC (2 years, 5 months ago) by tomek
added support for 'in()' statement in 'select'


Revision 1085 - Directory Listing
Modified Wed Apr 18 10:22:01 2018 UTC (2 years, 5 months ago) by tomek
added: QueryResult stack to PostgreSQLConnector
       this allowes us to call query() recursively (from after_select() callback)


Revision 1084 - Directory Listing
Modified Tue Apr 17 16:01:14 2018 UTC (2 years, 5 months ago) by tomek
temporarily changed the way how PT::Date is escaped


Revision 1081 - Directory Listing
Modified Mon Apr 16 22:46:25 2018 UTC (2 years, 5 months ago) by tomek
some work in morm
- support for fetching rows from db
- support for inserting/updating rows


Revision 1079 - Directory Listing
Modified Sun Apr 15 23:00:17 2018 UTC (2 years, 5 months ago) by tomek
some work in morm (select statement)



Revision 1078 - Directory Listing
Modified Thu Apr 12 16:05:14 2018 UTC (2 years, 5 months ago) by tomek
changed: esc() function for bool uses now 'true' and 'false' strings
added:  esc() for PT::Date



Revision 1077 - Directory Listing
Modified Fri Mar 30 19:34:45 2018 UTC (2 years, 5 months ago) by tomek
some work for SELECT statement


Revision 1075 - Directory Listing
Modified Fri Mar 23 19:26:57 2018 UTC (2 years, 5 months ago) by tomek
reorganizing class hierarchy


Revision 1073 - Directory Listing
Modified Tue Mar 13 22:24:06 2018 UTC (2 years, 6 months ago) by tomek
set svn:ignore to eclipse files


Revision 1072 - Directory Listing
Added Tue Mar 13 22:22:17 2018 UTC (2 years, 6 months ago) by tomek
start creating a new project: Micro ORM