add possibility of calculating how many rows there were before LIMIT was applied

The Finder has get_rows_counter() method which returns how many rows there were
before LIMIT clause was applied. The select(...) method should be called with
Select::with_rows_counter flag in such a case.

while here:
- change the semantic of Finder, now the select(...) method takes a morm::Select flags,
  and we have such flags:
  - Select::no_auto_generated_columns - do not generate columns from models
  - with_rows_counter - add an additional column for the rows counter
- remove Finder::prepare_to_select() - now use select(...) with no_auto_generated_columns flag
This commit is contained in:
2022-07-11 17:48:13 +02:00
parent 4e8f3af8fc
commit 43dfbd5d5a
16 changed files with 512 additions and 179 deletions

View File

@@ -468,6 +468,7 @@ void DbConnector::generate_remove_query(pt::TextStream & stream, Model & model)
}
}
bool DbConnector::insert(pt::TextStream & stream, Model & model)
{
std::unique_ptr<QueryResult> query_result_ptr(create_query_result());