From 37038ea004027950ba667b6a112ec1aaf1266f40 Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Mon, 25 Mar 2013 09:55:04 +0100 Subject: [PATCH 1/9] doc/ref/group updated --- doc/ref/data/dyn_query_ref.yaml | 685 +++++++++++++++++++++++ doc/ref/data/dyn_table_ref.yaml | 845 +++++++++++++++++++++++++++++ doc/ref/data/dyn_view_ref.yaml | 478 ++++++++++++++++ doc/ref/data/group_ref.yaml | 127 +++++ doc/ref/data/mixed_ref.yaml | 90 +++ doc/ref/data/reference.yaml | 66 +++ doc/ref/data/shared_group_ref.yaml | 274 ++++++++++ doc/ref/data/typed_query_ref.yaml | 650 ++++++++++++++++++++++ doc/ref/data/typed_table_ref.yaml | 73 +++ doc/ref/data/typed_view_ref.yaml | 410 ++++++++++++++ 10 files changed, 3698 insertions(+) create mode 100755 doc/ref/data/dyn_query_ref.yaml create mode 100755 doc/ref/data/dyn_table_ref.yaml create mode 100755 doc/ref/data/dyn_view_ref.yaml create mode 100755 doc/ref/data/group_ref.yaml create mode 100755 doc/ref/data/mixed_ref.yaml create mode 100644 doc/ref/data/reference.yaml create mode 100755 doc/ref/data/shared_group_ref.yaml create mode 100755 doc/ref/data/typed_query_ref.yaml create mode 100755 doc/ref/data/typed_table_ref.yaml create mode 100755 doc/ref/data/typed_view_ref.yaml diff --git a/doc/ref/data/dyn_query_ref.yaml b/doc/ref/data/dyn_query_ref.yaml new file mode 100755 index 0000000000..ae52d9f697 --- /dev/null +++ b/doc/ref/data/dyn_query_ref.yaml @@ -0,0 +1,685 @@ +# +# C++ reference documentation for Query class +# + +## TODO: Describe limitations about using correct versions of the methods on the right column_types. +## TODO: Detail what is allowed to pass in parameters (index within size() etc) +## TODO: Describe start, end index parameters in searches. end is not inclusive. + +ID : class_dyn_query +TITLE : Query (dynamic) +SUMMARY : &g_dyn_query_intro_summary + Query your TightDB table. +DESCR : &g_dyn_query_intro_descr + > + Query objects are used to build up queries. A query is tied to a + {@link class_dyn_table}. The dynamic query class is used in conjunction with the + dynamic table class. + + Conditions is added to a query through a + fluent interface. + This means that the methods representing the conditions will return the + query object. In general, the predicate functions require a column index + as parameter. The compiler cannot infer the correct types as tables are + declared at run time. Using wrong types might lead to run time errors. + + Once the query is ready, it is possible to reuse by multiple calls to + the action methods. + Moreover, it is possible extend the query with new conditions after applying an + action method and thereby implement a drill-down. It is important to stress that + no data is cached, and the new queries cannot benefit from previous queries. + + Alternatively, a query can result in a {@link class_dyn_tableview} which can be further + queried. +SEE : +EXAMPLES : +- DESCR: + CODE: ex_cpp_dyn_query_intro +IGNORE : [] # List of method-ids to ignore +CATEGORIES : +- Conditions: + METHODS: + - g_dyn_query_equals_boolean: + - g_dyn_query_equals_integer: + - g_dyn_query_equals_float: + - g_dyn_query_equals_double: + - g_dyn_query_equals_string: + - g_dyn_query_equals_date: + - g_dyn_query_equals_binary: + NAMES : [ equal, equal_date, equal_binary ] + SIGNATURE: | + Query& equal(size_t column_ndx, bool value); + Query& equal(size_t column_ndx, int64_t value); + Query& equal(size_t column_ndx, float value); + Query& equal(size_t column_ndx, double value); + Query& equal(size_t column_ndx, const char* value, bool case_sensitive=true); + Query& equal(size_t column_ndx, BinaryData value); + Query& equal_date(size_t column_ndx, time_t value); + SUMMARY : &g_dyn_query_equals_summary + Equal to. + DESCR : &g_dyn_query_equals_descr + Queries for column values which equals a specified value. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : [bool, int64_t, float, double, const char*, BinaryData, time_t] + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : &g_dyn_query_case_sensitive_descr + 'String match can be performed case sensitive or not. Default: true.' + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_equals +# - g_dyn_query_notEquals_boolean: + - g_dyn_query_notEquals_integer: + - g_dyn_query_notEquals_string: + - g_dyn_query_notEquals_date: + - g_dyn_query_notEquals_binary: + NAMES : [ not_equal, not_equal, not_equal_binary ] + SIGNATURE: | + Query& not_equal(size_t column_ndx, int64_t value); + Query& not_equal(size_t column_ndx, float value); + Query& not_equal(size_t column_ndx, double value); + Query& not_equal(size_t column_ndx, const char* value, bool case_sensitive=true); + Query& not_equal_date(size_t column_ndx, time_t value); + # Query& not_equal(size_t column_ndx, bool value); + # Query& not_equal_binary(size_t column_ndx, const char* data, size_t size); + SUMMARY : &g_dyn_query_notEquals_summary + Not equal to. + DESCR : &g_dyn_query_notEquals_descr + Queries for column values which do not equal a specified value. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : [bool, int64_t, float, double, const char*, time_t] + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : 'String match can be performed case sensitive or not. Default: true.' + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_notEquals + - g_dyn_query_greaterThan: + - g_dyn_query_greaterThan_date: + NAMES : [ greater, greater_date ] + SIGNATURE: | + Query& greater(size_t column_ndx, int64_t value); + Query& greater(size_t column_ndx, float value); + Query& greater(size_t column_ndx, double value); + Query& greater_date(size_t column_ndx, time_t value); + SUMMARY : &g_dyn_query_greaterThan_summary + Greater than. + DESCR : &g_dyn_query_greaterThan_descr + Queries for column values greater than a specified value. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_greaterThan + - g_dyn_query_greaterThanOrEqual: + - g_dyn_query_greaterThanOrEqual_date: + NAMES : [ greater_equal, greater_equal_date ] + SIGNATURE: | + Query& greater_equal(size_t column_ndx, int64_t value); + Query& greater_equal(size_t column_ndx, float value); + Query& greater_equal(size_t column_ndx, double value); + Query& greater_equal_date(size_t column_ndx, time_t value); + SUMMARY : &g_dyn_query_greaterThanOrEqual_summary + Greater than or equal to. + DESCR : &g_dyn_query_greaterThanOrEqual_descr + Queries for column values greater than or equal to a specified value. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_greaterThanOrEqual + - g_dyn_query_lessThan: + - g_dyn_query_lessThan_date: + NAMES : [less, less_date] + SIGNATURE: | + Query& less(size_t column_ndx, int64_t value); + Query& less(size_t column_ndx, float value); + Query& less(size_t column_ndx, double value); + Query& less_date(size_t column_ndx, time_t value); + SUMMARY : &g_dyn_query_lessThan_summary + Less than. + DESCR : &g_dyn_query_lessThan_descr + Queries for column values less than a specified value. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_lessThan + - g_dyn_query_lessThanOrEqual: + - g_dyn_query_lessThanOrEqual_date: + NAMES : [less_equal, less_equal_date] + SIGNATURE: | + Query& less_equal(size_t column_ndx, int64_t value); + Query& less_equal(size_t column_ndx, int64_t value); + Query& less_equal(size_t column_ndx, int64_t value); + Query& less_equal_date(size_t column_ndx, time_t value); + SUMMARY : &g_dyn_query_lessThanOrEqual_summary + Less than or equal to. + DESCR : &g_dyn_query_lessThanOrEqual_descr + Queries for column values less than or equal to a specified value. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_lessThanOrEqual + - g_dyn_query_between: + - g_dyn_query_between_date: + NAMES : [between, between_date] + SIGNATURE: | + Query& between(size_t column_ndx, int64_t from, int64_t to); + Query& between(size_t column_ndx, float from, float to); + Query& between(size_t column_ndx, double from, double to); + Query& between_date(size_t column_ndx, time_t from, time_t to); + DESCR : &g_dyn_query_between_descr + Queries for column values in ranges. + SUMMARY : &g_dyn_query_between_summary + Belongs to an interval. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : from + TYPES : [int64_t, float, double, time_t] + DESCR : Lower bound of range (inclusive). + - NAME : to + TYPES : [int64_t, float, double, time_t] + DESCR : Upper bound of range (inclusive). + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_between + - g_dyn_query_startsWith: +# - g_dyn_query_startsWith_binary: + NAMES : [begins_with] #, begins_with_binary] + SIGNATURE: | + Query& begins_with(size_t column_ndx, const char* value, bool case_sensitive=true); +# Query& begins_with_binary(size_t column_ndx, const char* data, size_t size); + DESCR : &g_dyn_query_startsWith_descr + Queries for column values which begin with a certain prefix. + SUMMARY : &g_dyn_query_startsWith_summary + Substring match at the begining of the attribute. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : const char* + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : *g_dyn_query_case_sensitive_descr + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_startsWith + - g_dyn_query_endsWith: +# - g_dyn_query_endsWith_binary: + NAMES : [ends_with] #, ends_with_binary] + SIGNATURE: | + Query& ends_with(size_t column_ndx, const char* value, bool case_sensitive=true); +# Query& ends_with_binary(size_t column_ndx, const char* data, size_t size); + DESCR : &g_dyn_query_endsWith_descr + Queries for column values which end with a specified suffix. + SUMMARY : &g_dyn_query_endsWith_summary + Substring match at the end of the value in the column column_ndx. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : const char* + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : *g_dyn_query_case_sensitive_descr + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_endsWith + - g_dyn_query_contains: +# - g_dyn_query_contains_binary: + NAMES : [contains] #, contains_binary] + SIGNATURE: | + Query& contains(size_t column_ndx, const char* value, bool case_sensitive=true); +# Query& contains_binary(size_t column_ndx, const char* data, size_t size); + DESCR : &g_dyn_query_contains_descr + Queries for column values which contain the specified substring. + SUMMARY : &g_dyn_query_contains_summary + Substring search. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : value + TYPES : const char* + DESCR : The value + - NAME : case_sensitive + TYPES : bool + DESCR : *g_dyn_query_case_sensitive_descr + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_contains +- Combiners: + METHODS: + - g_dyn_query_group: + NAMES : group + DESCR : &g_dyn_query_group_descr + > + Group conditions ("left" parenthesis). Group of conditions can be nested and they are + conceptually a parenthesis. + SUMMARY : &g_dyn_query_group_summary + Start group ("left parenthesis"). + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_group + - g_dyn_query_endGroup: + NAMES : end_group + DESCR : &g_dyn_query_endGroup_descr + Group conditions ("right" parenthesis). + SUMMARY : &g_dyn_query_endGroup_summary + Stop group ("right parenthesis"). + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_group + - g_dyn_query_or: + NAMES : Or + DESCR : &g_dyn_query_or_descr + Conditions to the left and right are folded using logical-or. + SUMMARY : &g_dyn_query_or_summary + Logical-or. + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_or + - g_dyn_query_subtable: + NAMES : subtable + DESCR : &g_dyn_query_subtable_descr + Query a subtable. + SUMMARY : &g_dyn_query_subtable_summary + Query a subtable. + PARAMS: + - NAME : column + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_subtable + - g_dyn_query_endSubtable: + NAMES : end_subtable + DESCR : &g_dyn_query_endSubtable_descr + End of subtable query. + SUMMARY : &g_dyn_query_endSubtable_summary + End of subtable query. + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_subtable +- Actions: + METHODS: + - g_dyn_query_find_all_const: + - g_dyn_query_find_all: + NAMES : find_all + DESCR : &g_dyn_query_find_all_descr + This method executes the query. See the {@link class_dyn_tableview} class for further details. + SUMMARY : &g_dyn_query_find_all_summary + Execute query. + SIGNATURE: | + TableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + ConstTableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + PARAMS: + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [TableView, ConstTableView] + DESCR : The TableView object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_findall + - g_dyn_query_find_next: + NAMES : find_next + DESCR : &g_dyn_query_find_next_descr + Find next row. + SUMMARY : &g_dyn_query_find_next_summary + Find next row. + PARAMS: + - NAME : lastmatch + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + RETURN: + TYPES : size_t + DESCR : Row number + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_find_next + - g_dyn_query_sum: + - g_dyn_query_sum_float: + - g_dyn_query_sum_double: + NAMES : [sum, sum_float, sum_double] + DESCR : &g_dyn_query_sum_descr + | + This methods calculates the sum of the values in a specific column. + + Note: sum() can overflow depending on the values stored. Nothing will indicate this. + Note: Adding many floats or doubles can accumulate representation imprecisions. + SUMMARY : &g_dyn_query_sum_summary + Calculate sum. + CONST : true + SIGNATURE: | + int64_t sum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; + double sum_float(..same parameters as above..) + double sum_double(..same parameters as above..) + PARAMS: + - NAME : column_ndx + DESCR : Column index. The datatype of the column must match the function called. E.g. sum_float() can only be used on columns which contains floats. + TYPES : size_t + - NAME : resultcount + DESCR : The number of rows used to calculate the sum. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [int64_t, float, double] + DESCR : The sum. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_sum + - g_dyn_query_size: + NAMES : count + DESCR : &g_dyn_query_size_descr + The method finds the number of matching rows. + SUMMARY : &g_dyn_query_size_summary + Number of matching rows. + CONST : true + PARAMS: + - NAME : column + DESCR : Column index. + TYPES : size_t + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_size + - g_dyn_query_maximum_date: + - g_dyn_query_maximum_double: + - g_dyn_query_maximum_float: + - g_dyn_query_maximum: + NAMES : maximum + DESCR : &g_dyn_query_maximum_descr + This method finds the highest value in the column or in a range of rows in the column. + SUMMARY : &g_dyn_query_maximum_summary + Highest value. + CONST : true + SIGNATURE: | + int64_t maximum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; + float maximum_float(..parameters as above..) + double maximum_double(..parameters as above..) + time_t maximum_date(..parameters as above..) + PARAMS: + - NAME : column_ndx + DESCR : Column index. The datatype of the column must match the function called. E.g. maximum_float() can only be used on columns which contains floats. + TYPES : size_t + - NAME : resultcount + DESCR : The number of rows used to find the highest value. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to search. Default: -1 (infinity)." + RETURN: + TYPES : [int64_t, float, double, time_t] + DESCR : The highest value. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_maximum + - g_dyn_query_minimum_date: + - g_dyn_query_minimum_double: + - g_dyn_query_minimum_float: + - g_dyn_query_minimum: + NAMES : minimum + DESCR : &g_dyn_query_minimum_descr + This method finds the lowest value in the column or in a range of rows in the column. + SUMMARY : &g_dyn_query_minimum_summary + Lowest value. + CONST : true + SIGNATURE: | + int64_t minimum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; + float minimum_float(..parameters as above..) + double minimum_double(..parameters as above..) + time_t minimum_date(..parameters as above..) + PARAMS: + - NAME : column_ndx + DESCR : Column index. The datatype of the column must match the function called. E.g. minimum_float() can only be used on columns which contains floats. + TYPES : size_t + - NAME : resultcount + DESCR : The number of rows used to find the lowest value. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [int64_t, float, double, time_t] + DESCR : The lowest value. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_minimum + - g_dyn_query_average_double: + - g_dyn_query_average_float: + - g_dyn_query_average: + NAMES : average + SUMMARY : &g_dyn_query_average_summary + Calculates the average. + DESCR : &g_dyn_query_average_descr + | + The method calculates the average of a specific column. + + Note: average() uses sum() which can overflow depending on the values stored. Nothing will indicate this. + Note: Averaging many floats or doubles can accumulate representation imprecisions. + CONST : true + SIGNATURE: | + double average(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; + double average_float(..as above..) + double average_double(..as above..) + PARAMS: + - NAME : column_ndx + DESCR : Column index. The datatype of the column must match the function called. E.g. average_float() can only be used on columns which contains floats. + TYPES : size_t + - NAME : resultcount + DESCR : The number of rows used to calculate the average. If zero, the return value is undefined. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : double + DESCR : The average. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_average + - g_dyn_query_remove: + NAMES : remove + DESCR : &g_dyn_query_remove_descr + This method will remove all matching rows in the source table. + SUMMARY : &g_dyn_query_remove_summary + Remove rows. + CONST : true + PARAMS: + - NAME : column + DESCR : Column index. + TYPES : size_t + - NAME : resultcount + DESCR : The number of rows used to calculate the average. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : size_t + DESCR : The number of rows removed. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_remove +- Multithreaded: + METHODS: + - g_dyn_query_find_all_multi: + - g_dyn_query_find_all_const_multi: + NAMES : find_all_multi + DESCR : &g_dyn_query_find_all_multi_descr + > + This method execute a query using (POSIX) threads that is, the query is parallellized and + can lower the search time on a multi-core computer. See the {@link class_dyn_tableview} class + for further details. + SUMMARY : &g_dyn_query_find_all_multi_summary + Execute query. + SIGNATURE: | + TableView find_all_multi(Table& table, size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + ConstTableView find_all_multi(const Table& table, size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + + PARAMS: + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [TableView, ConstTableView] + DESCR : The TableView object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_find_all_multi + - g_dyn_query_set_threads: + NAMES : set_threads + SUMMARY : &g_dyn_query_set_threads_summary + Set the number of threads. + DESCR : &g_dyn_query_set_threads_descr + The method sets the number of threads used by {@link g_dyn_query_find_all_multi}. + PARAMS: + - NAME : threadcount + TYPES : unsigned int + DESCR : Number of threads. + RETURN: + DESCR : true if succesfull, false otherwise. + TYPES : int + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_query_find_all_multi diff --git a/doc/ref/data/dyn_table_ref.yaml b/doc/ref/data/dyn_table_ref.yaml new file mode 100755 index 0000000000..2da5c39bb0 --- /dev/null +++ b/doc/ref/data/dyn_table_ref.yaml @@ -0,0 +1,845 @@ +# +# C++ reference documentation for Table class +# + +ID : class_dyn_table +TITLE : Table (dynamic) +SUMMARY : &g_dyn_table_intro_summary + TightDB table. +DESCR : &g_dyn_table_intro_descr + The Table class is the core class of the TightDB framework. It allows you + to efficiently work with data in terms of rows and columns. The value of + a cell (specific column, specific row) is compacted in order to keep the + overall memory consumption as little as possible. The internal data structure + is optimized so retrieving a particular row in a table is as fast as possible + (often faster than native data structures). + + The dynamic table can be used when the structure of the data is not known a + priori. This situation is common if you recieve data for different sources, and + these sources changes often. You can say that a dynamic table resembles the + flexible data structures often found in dynamic languages like PHP and JavaScript. + + You can add and remove columns at run time as your application requires it. When you + add a column, a type must be specified. The most common types including integers, + timestamps and strings are suppotted. It is possible to use a TightDB table class + as column type. This means that you can have tables of tables structure. + + Moreover, TightDB introduces a column type called {@link class_mixed}. A value of the + Mixed type can be any supported value of TightDB. This implies - as the name + indicates - that you can mix the type of values in the the column. In one row the + value could be an integer, in another row the value could be a string or even a table. + + It is possible to query a dynamic table using {@link class_dyn_query} objects. The result + set is often stored in a {@link class_dyn_tableview} object. +SEE : +EXAMPLES : +- DESCR: + CODE : ex_cpp_dyn_table_intro +IGNORE : [] # List of method-ids to ignore +CATEGORIES : +- State: + METHODS: + - g_dyn_table_size: + NAMES : size + SUMMARY : &g_dyn_table_size_summary + Number of rows. + DESCR : &g_dyn_table_size_descr + This method gets the number of rows in a table. + CONST : True + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - CODE : ex_cpp_dyn_table_size + DESCR : + - g_dyn_table_is_empty: + NAMES : is_empty + SUMMARY : &g_dyn_table_is_empty_summary + Is table empty? + DESCR : &g_dyn_table_is_empty_descr + This method checks if the table is empty that is, it has zero rows. + CONST : True + RETURN: + TYPES : bool + DESCR : true if empty, false otherwise. + EXAMPLES: + - CODE : ex_cpp_dyn_table_is_empty + DESCR : + - g_dyn_table_is_valid: + NAMES : is_valid + SUMMARY : &g_dyn_table_is_valid_summary + Is table valid/consistent? + DESCR : &g_dyn_table_is_valid_descr + This method will perform a number of consistency checks on a table and its + columns. + CONST : true + RETURN: + TYPES : bool + DESCR : true if table is valid, false otherwise. + EXAMPLES: + - CODE : ex_cpp_dyn_table_is_valid + DESCR : +- Table: + METHODS: + - g_dyn_table_clear: + NAMES : clear + SUMMARY : &g_dyn_table_clear_summary + Remove all rows. + DESCR : &g_dyn_table_clear_descr + This method will remove all rows in a table. + EXAMPLES: + - CODE : ex_cpp_dyn_table_clear + DESCR : + - g_dyn_table_optimize: + NAMES : optimize + SUMMARY : &g_dyn_table_optimize_summary + Optimize a table. + DESCR : &g_dyn_table_optimize_descr + This method will optimize the internal data structures of a table. + The result is that the table will consume less memory and queries might + be faster. + + This should be called as soon as there is an representative amount of + data in the table. The table will then reorganize itself into the most + effective format. + + What is learned about the contents will be used in all future operations, + so you only need to call optimize once. + EXAMPLES: + - CODE : ex_cpp_dyn_table_optimize + DESCR : + - g_dyn_table_opertator==: + NAMES : operator== + SUMMARY : &g_dyn_table_operator_eq_summary + Compare two tables. + DESCR : &g_dyn_table_operator_eq_descr + Compare two tables for equality. Two tables are equal if, and + only if, they contain the same columns and rows in the same + order, that is, for each value V of type T at column index C + and row index R in one of the tables, there is a value of type + T at column index C and row index R in the other table that + is equal to V. This method returns true if two tables are identical. + CONST : True + PARAMS: + - NAME : table + TYPES : const Table& + DESCR : The other table. + RETURN: + TYPES : bool + DESCR : true if the two tables are equal, false otherwise, + EXAMPLES: + - CODE : ex_cpp_dyn_table_operator== + DESCR : + - g_dyn_table_opertator!=: + NAMES : operator!= + SUMMARY : &g_dyn_table_operator_neq_summary + Compare two tables. + DESCR : &g_dyn_table_operator_neq_descr + Compare two tables for equality. Two tables are equal if, and + only if, they contain the same columns and rows in the same + order, that is, for each value V of type T at column index C + and row index R in one of the tables, there is a value of type + T at column index C and row index R in the other table that + is equal to V. This method returns true if two tables are not identical. + CONST : True + PARAMS: + - NAME : table + TYPES : const Table& + DESCR : The other table. + RETURN: + TYPES : bool + DESCR : true if the two tables are not equal, false otherwise, + EXAMPLES: + - CODE : ex_cpp_dyn_table_operator!= + DESCR : +- Columns: + METHODS: + - g_dyn_table_get_column_count: + NAMES : get_column_count + SUMMARY : &g_dyn_table_get_column_count_summary + Get the number of columns. + DESCR : &g_dyn_table_get_column_count_descr + This method retrieves the number of columns. + CONST : True + RETURN: + TYPES : size_t + DESCR : The number of columns. + EXAMPLES: + - CODE : ex_cpp_dyn_table_get_column_count + DESCR : + - g_dyn_table_get_column_name: + NAMES : get_column_name + SUMMARY : &g_dyn_table_get_column_name_summary + Get the name of a column. + DESCR : &g_dyn_table_get_column_name_descr + This method gets the name of a column using the column index. + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + RETURN: + TYPES : const char* + DESCR : The column name. + EXAMPLES: + - CODE : ex_cpp_dyn_table_get_column_name + DESCR : + - g_dyn_table_get_column_index: + NAMES : get_column_index + SUMMARY : &g_dyn_table_get_column_index_summary + Get the index of a column. + DESCR : &g_dyn_table_get_column_index_descr + This method gets the index of a column using the column name. + CONST : True + PARAMS: + - NAME : column_name + TYPES : const char* + DESCR : The column name. + RETURN: + TYPES : size_t + DESCR : The column index or std::size_t(-1) if there is no column with the specified name. + EXAMPLES: + - CODE : ex_cpp_dyn_table_get_column_index + DESCR : + - g_dyn_table_get_column_type: + NAMES : get_column_type + SUMMARY : &g_dyn_table_get_column_type_summary + Get the type of a column. + DESCR : &g_dyn_table_get_column_type_descr + > + This method gets the type of a column using the column index. Currently, + the following types are supported: + + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + RETURN: + TYPES : DataType + DESCR : The column type. + EXAMPLES: + - CODE : ex_cpp_dyn_table_get_column_type + DESCR : +- Rows: + METHODS: + - g_dyn_table_add_empty_row: + NAMES : add_empty_row + SUMMARY : &g_dyn_table_add_empty_row_summary + Add empty rows. + DESCR : &g_dyn_table_add_empty_row_descr + This method adds one or more empty rows at the end of the table. + SIGNATURE: | + void add_empty_row(size_t num_rows = 1) + PARAMS: + - NAME : num_rows + TYPES : size_t + DESCR : "Number of rows to add (default: 1)." + - g_dyn_table_insert_empty_row: + NAMES : insert_empty_row + SUMMARY : &g_dyn_table_insert_empty_row_summary + Insert empty rows. + DESCR : &g_dyn_table_insert_empty_row_descr + This method inserts one or more empty rows at a given position. + SIGNATURE: | + void insert_empty_row(size_t row_ndx, size_t num_rows = 1) + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : Position to insert at. + - NAME : num_rows + TYPES : size_t + DESCR : "Number of rows to insert (default: 1)." + - g_dyn_table_insert_bool: + - g_dyn_table_insert_int: + - g_dyn_table_insert_enum: + - g_dyn_table_insert_date: + - g_dyn_table_insert_string: + - g_dyn_table_insert_binary: + - g_dyn_table_insert_mixed: + - g_dyn_table_insert_done: + NAMES : insert_* + SUMMARY : &g_dyn_table_insert_xxx_summary + Insert a value. + DESCR : &g_dyn_table_insert_xxx_descr + > + These methods are used to insert new rows in a table. + + WARNING: These methods support inserts with maximal performance. + But they can easily corrupt the database if used incorrectly! When inserting + a new row, you have to call the corresponding insert method for every column in the table + and end the insert sequence by calling {@link g_dyn_table_insert_done insert_done()}. + + insert_binary() will copy the data provided. + + SIGNATURE: | + void insert_bool(size_t column_ndx, size_t row_ndx, bool value) + void insert_int(size_t column_ndx, size_t row_ndx, int64_t value) + templatevoid insert_enum(size_t column_ndx, size_t row_ndx, E value) + void insert_float(size_t column_ndx, size_t row_ndx, float value) + void insert_double(size_t column_ndx, size_t row_ndx, double value) + void insert_date(size_t column_ndx, size_t row_ndx, time_t value) + void insert_string(size_t column_ndx, size_t row_ndx, const char* value) + void insert_binary(size_t column_ndx, size_t row_ndx, const char* value, size_t len) + void insert_mixed(size_t column_ndx, size_t row_ndx, Mixed value) + void insert_subtable(size_t column_ndx, size_t row_ndx) + void insert_done() + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*, Mixed] + DESCR : The value to insert. + - NAME : len + TYPES : size_t + DESCR : Size in bytes of binary value. + EXAMPLES: + - CODE : ex_cpp_dyn_table_insert_xxx + DESCR : + SEE : "For a safe way to insert rows, use {@link g_dyn_table_insert_empty_row}, and then set individual values in the columns." + + - g_dyn_table_remove_row: + NAMES : remove + SUMMARY : &g_dyn_table_remove_row_summary + Delete row. + DESCR : &g_dyn_table_remove_row_descr + This method deletes a specific row. + SIGNATURE: void remove(size_t row_ndx); + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : Position of the row to delete. + EXAMPLES: + - CODE : ex_cpp_dyn_table_remove + DESCR : + - g_dyn_table_remove_last_row: + NAMES : remove_last + SUMMARY : &g_dyn_table_remove_last_row_summary + Delete last row. + DESCR : &g_dyn_table_remove_last_row_descr + This method deletes the last row. Calling it on an empty table is an error. + SIGNATURE: void remove_last(); + EXAMPLES: + - CODE : ex_cpp_dyn_table_remove_last_row + DESCR : +- Values: + METHODS: + - g_dyn_table_get_bool: + - g_dyn_table_get_int: + - g_dyn_table_get_date: + - g_dyn_table_get_string: + - g_dyn_table_get_binary: + - g_dyn_table_get_mixed: + - g_dyn_table_get_mixed_type: + - g_dyn_table_get_subtable: + - g_dyn_table_get_subtable_const: + NAMES : get_* + SUMMARY : &g_dyn_table_get_xxx_summary + Get value. + DESCR : &g_dyn_table_get_xxx_descr + This method will retrieve the value of a cell (row/column). + SIGNATURE: | + bool get_bool(size_t column_ndx, size_t row_ndx) const; + int64_t get_int(size_t column_ndx, size_t row_ndx) const; + time_t get_date(size_t column_ndx, size_t row_ndx) const; + float get_float(size_t column_ndx, size_t row_ndx) const; + double get_double(size_t column_ndx, size_t row_ndx) const; + const char* get_string(size_t column_ndx, size_t row_ndx) const; + BinaryData get_binary(size_t column_ndx, size_t row_ndx) const; + Mixed get_mixed(size_t column_ndx, size_t row_ndx) const; + DataType get_mixed_type(size_t column_ndx, size_t row_ndx) const + + TableRef get_subtable(size_t column_ndx, size_t row_ndx); + ConstTableRef get_subtable(size_t column_ndx, size_t row_ndx) const; + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + RETURN: + TYPES : [bool, int64_t, float, double, time_t, const char*, BinaryData, Mixed, DataType] + DESCR : The value. + EXAMPLES: + - CODE : ex_cpp_dyn_table_get_xxx + DESCR : + - g_dyn_table_set_bool: + - g_dyn_table_set_int: + - g_dyn_table_set_enum: + - g_dyn_table_set_date: + - g_dyn_table_set_string: + - g_dyn_table_set_binary: + - g_dyn_table_set_mixed: + NAMES : set_* + SUMMARY : &g_dyn_table_set_xxx_summary + Set value. + DESCR : &g_dyn_table_set_xxx_descr + This method will set the value of an existing cell (row/column). + SIGNATURE: | + void set_bool(size_t column_ndx, size_t row_ndx, bool value); + void set_int(size_t column_ndx, size_t row_ndx, int64_t value); + void set_float(size_t column_ndx, size_t row_ndx, float value); + void set_double(size_t column_ndx, size_t row_ndx, double value); + template void set_enum(size_t column_ndx, size_t row_ndx, E value); + void set_date(size_t column_ndx, size_t row_ndx, time_t value); + void set_string(size_t column_ndx, size_t row_ndx, const char* value); + void set_binary(size_t column_ndx, size_t row_ndx, const char* value, size_t len); + void set_mixed(size_t column_ndx, size_t row_ndx, Mixed value); + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*, Mixed] + DESCR : The value. + - NAME : len + TYPES : size_t + DESCR : Size in bytes of binary value. + EXAMPLES: + - CODE : ex_cpp_dyn_table_set_xxx + DESCR : +- Sub-tables: + METHODS: + - g_dyn_table_get_subtable_size: + NAMES : get_subtable_size + SUMMARY : &g_dyn_table_get_subtable_size_summary + Get subtable + DESCR : &g_dyn_table_get_subtable_size_descr + The value of a cell can be a table. Such a value is referred to as + a subtable. This method retrieves the number of rows of a subtable. + CONST : true + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + RETURN: + TYPES : size_t + DESCR : Number of rows. + EXAMPLES: + - CODE : ex_cpp_dyn_table_get_subtable + DESCR : + - g_dyn_table_clear_subtable: + NAMES : clear_subtable + SUMMARY : &g_dyn_table_clear_subtable_summary + Get subtable + DESCR : &g_dyn_table_clear_subtable_descr + The value of a cell can be a table. Such a value is referred to + as a subtable. This method deletes all rows of such a subtable. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + EXAMPLES: + - CODE : ex_cpp_dyn_table_clear_subtable + DESCR : +- Indexes: + METHODS: + - g_dyn_table_set_index: + NAMES : set_index + SUMMARY : &g_dyn_table_set_index_summary + Add an index to a column. + DESCR : &g_dyn_table_set_index_descr + This method adds an index to a column, and queries will be faster but the table + will require more memory. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : update_spec + TYPES : bool + DESCR : "If true, the table spec will be updated. Default: true." + EXAMPLES: + - CODE : ex_cpp_dyn_table_set_index + DESCR : + - g_dyn_table_has_index: + NAMES : has_index + SUMMARY : &g_dyn_table_has_index_summary + Is column indexed? + DESCR : &g_dyn_table_has_index_descr + This method checks if a specific column has an index. + CONST : true + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : bool + DESCR : true if column is indexed, false otherwise. + EXAMPLES: + - CODE : ex_cpp_dyn_table_has_index + DESCR : +- Searching: + METHODS: + - g_dyn_table_lookup: + NAMES : lookup + SUMMARY : &g_dyn_table_lookup_summary + Lookup a value. + DESCR : &g_dyn_table_lookup_descr + This method will find the first row where the value of first column matches + a given string value. Defining the first column as a string with unique values, + it is possible to combine such a table with this method to emulate a hash + array using TightDB. + CONST : True + PARAMS: + - NAME : value + TYPES : const char* + DESCR : The value to search for. + RETURN: + TYPES : size_t + DESCR : "The row index or tightdb::not_found (equal to size_t(-1)) if there is no match." + EXAMPLES: + - CODE : ex_cpp_dyn_table_lookup + DESCR : + - g_find_first_bool: + - g_find_first_int: + - g_find_first_date: + - g_find_first_string: + NAMES : find_first_* + SUMMARY : Find first matching row. + DESCR : The method finds the first occurence of a given value in a column. + SIGNATURE: | + size_t find_first_int(size_t column_ndx, int64_t value) const; + size_t find_first_bool(size_t column_ndx, bool value) const; + size_t find_first_date(size_t column_ndx, time_t value) const; + size_t find_first_string(size_t column_ndx, const char* value) const; + size_t find_first_float(size_t column_ndx, float value) const; + size_t find_first_double(size_t column_ndx, double value) const; + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*] + DESCR : The value. + RETURN: + TYPES : size_t + DESCR : "The row index or tightdb::not_found (equal to std::size_t(-1)) if there is no match." + EXAMPLES: + - CODE : ex_cpp_dyn_table_find_first_xxx + DESCR : + - g_find_all_bool: + - g_find_all_int: + - g_find_all_date: + - g_find_all_string: + - g_find_all_float: + - g_find_all_double: + - g_find_all_bool_const: + - g_find_all_int_const: + - g_find_all_date_const: + - g_find_all_string_const: + - g_find_all_float_const: + - g_find_all_double_const: + NAMES : find_all_* + SUMMARY : *g_find_all_xxx_summary + DESCR : > + The method finds all occurences of a given value in a specific column. + The rows are returned as a {@link class_dyn_tableview} object. + SIGNATURE: | + TableView find_all_int(size_t column_ndx, int64_t value); + TableView find_all_bool(size_t column_ndx, bool value); + TableView find_all_date(size_t column_ndx, time_t value); + TableView find_all_string(size_t column_ndx, const char* value); + TableView find_all_float(size_t column_ndx, float value); + TableView find_all_double(size_t column_ndx, double value); + + ConstTableView find_all_int(size_t column_ndx, int64_t value) const; + ConstTableView find_all_bool(size_t column_ndx, bool value) const; + ConstTableView find_all_date(size_t column_ndx, time_t value) const; + ConstTableView find_all_string(size_t column_ndx, const char* value) const; + ConstTableView find_all_float(size_t column_ndx, float value) const; + ConstTableView find_all_double(size_t column_ndx, double value) const; + + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*] + DESCR : The value. + RETURN: + TYPES : TableView + DESCR : The view. + EXAMPLES: + - CODE : ex_cpp_dyn_table_find_all_xxx + DESCR : + - g_dyn_table_get_sorted_view: + - g_dyn_table_get_sorted_view_const: + NAMES : get_sorted_view + SUMMARY : &g_dyn_table_get_sorted_view_summary + Sort the table. + DESCR : &g_dyn_table_get_sorted_view_desc + This method will sort the rows by using values of a given column. + The rows are returned as a {@link class_dyn_tableview} object. + SIGNATURE: | + TableView get_sorted_view(size_t column_ndx, bool ascending=true); + ConstTableView get_sorted_view(size_t column_ndx, bool ascending=true) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : ascending + TYPES : bool + DESCR : &cpp_dyn_table_get_sorted_view_param + "If true, rows are sorted ascending, otherwise descending. Default: true." + RETURN: + TYPES : TableView + DESCR : A view. + EXAMPLES: + - CODE : ex_cpp_dyn_table_get_sorted_view + DESCR : + - g_dyn_table_distinct: + - g_dyn_table_distinct_const: + NAMES : distinct + SUMMARY : &g_dyn_table_distinct_summary + Get distinct rows. + DESCR : &g_dyn_table_distinct_desc + > + This method will return a view with distinct rows for a given column + (first matching row for each unique value in column). + The rows are returned as a {@link class_dyn_tableview} object. + SIGNATURE: | + TableView distinct(size_t column_ndx); + ConstTableView distinct(size_t column_ndx) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + RETURN: + TYPES : TableView + DESCR : A view. + EXAMPLES: + - CODE : ex_cpp_dyn_table_distinct + DESCR : + - g_dyn_table_where: + - g_dyn_table_where_const: + NAMES : [where, where] + SIGNATURE: | + Query where() + const Query where() const + SUMMARY : Query table. + DESCR : This method initiates a query. See {@link class_dyn_query}. + RETURN: + TYPES : [Query, const Query] + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_dyn_table_where +- Aggregates: + METHODS: + - g_dyn_table_count_int: + NAMES : count_int + SUMMARY : &g_dyn_table_count_summary + Number of matching rows. + DESCR : &g_dyn_table_count_descr + This method gets the number of rows matching a value. It is useful + to determine the number briefly compared to using a {@link class_dyn_query} + object. + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : target + TYPES : int64_t + DESCR : The value. + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - CODE : ex_cpp_dyn_table_count + DESCR : + - g_dyn_table_count_string: + NAMES : count_string + SUMMARY : &g_dyn_table_count_string_summary + Number of matching rows. + DESCR : &g_dyn_table_count_string_descr + This method gets the number of rows matching a string value. It is useful + to determine the number briefly compared to using a {@link class_dyn_query} + object. + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + - NAME : target + TYPES : const char* + DESCR : The value. + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - CODE : ex_cpp_dyn_table_count_string + DESCR : + - g_dyn_table_sum: + - g_dyn_table_sum_float: + - g_dyn_table_sum_double: + NAMES : [sum, sum_float, sum_double] + SUMMARY : &g_dyn_table_sum_summary + Calculates the sum. + DESCR : &g_dyn_table_sum_descr + This method calculates the sum of a specific column. + SIGNATURE: | + int64_t sum(size_t column_ndx) const; + double sum_float(size_t column_ndx) const; + double sum_double(size_t column_ndx) const; + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : [int64_t, double] + DESCR : The sum. + EXAMPLES: + - CODE : ex_cpp_dyn_table_sum + DESCR : + - g_dyn_table_maximum: + - g_dyn_table_maximum_float: + - g_dyn_table_maximum_double: + NAMES : [maximum, maximum_float, maximum_double] + SUMMARY : &g_dyn_table_maximum_summary + Find highest value. + DESCR : &g_dyn_table_maximum_descr + The method finds the highest value. + SIGNATURE: | + int64_t maximum(size_t column_ndx) const; + float maximum_float(size_t column_ndx) const; + double maximum_double(size_t column_ndx) const; + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : [int64_t, float, double] + DESCR : The maximum value. + EXAMPLES: + - CODE : ex_cpp_dyn_table_maximum + DESCR : + - g_dyn_table_minimum: + - g_dyn_table_minimum_float: + - g_dyn_table_minimum_double: + NAMES : [minimum, minimum_float, minimum_double] + SUMMARY : &g_dyn_table_minimum_summary + Find lowest value. + DESCR : &g_dyn_table_minimum_descr + The method finds the lowest value. + CONST : True + SIGNATURE: | + int64_t minimum(size_t column_ndx) const; + float minimum_float(size_t column_ndx) const; + double minimum_double(size_t column_ndx) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : [int64_t, float, double] + DESCR : The minimum value. + EXAMPLES: + - CODE : ex_cpp_dyn_table_minimum + DESCR : + - g_dyn_table_average: + - g_dyn_table_average_float: + - g_dyn_table_average_double: + NAMES : [average, average_float, average_double] + SUMMARY : &g_dyn_table_average_summary + Calculates the average. + DESCR : &g_dyn_table_average_descr + This method calculates the average for a column. + CONST : True + SIGNATURE: | + double average(size_t column_ndx) const; + double average_float(size_t column_ndx) const; + double average_double(size_t column_ndx) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : double + DESCR : The average + EXAMPLES: + - CODE : ex_cpp_dyn_table_average + DESCR : +- Dump: + METHODS: + - g_dyn_table_to_json: + NAMES : to_json + SUMMARY : &g_dyn_table_to_json_summary + Convert table to JSON. + DESCR : &g_dyn_table_to_json_descr + The JavaScript Object Notation (JSON) is useful + for web/mobile applications and serialization. This method will convert a table + and its columns and rows to a JSON compatible representation. + PARAMS: + - NAME : out + TYPES : std::ostream& + DESCR : Output stream. + EXAMPLES: + - CODE : ex_cpp_dyn_table_to_json + DESCR : + - g_dyn_table_to_string: + NAMES : to_string + SUMMARY : &g_dyn_table_to_string_summary + Convert table to a string. + DESCR : &g_dyn_table_to_string_descr + > + This method will convert a table and its columns and rows to a format + which is easily read by humans. + CONST : true + PARAMS: + - NAME : out + TYPES : std::ostream& + DESCR : Output stream. + - NAME : limit + TYPES : size_t + DESCR : "The number of rows to convert. Default: 500." + EXAMPLES: + - CODE : ex_cpp_dyn_table_to_string + DESCR : + - g_dyn_table_row_to_string: + NAMES : to_string + SUMMARY : &g_dyn_table_row_to_string_summary + Convert a row to a string. + DESCR : &g_dyn_table_row_to_string_descr + > + This method will convert a row to a format + which is easily read by humans. + CONST : true + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + - NAME : out + TYPES : std::ostream& + DESCR : Output stream. + EXAMPLES: + - CODE : ex_cpp_dyn_table_to_string + DESCR : diff --git a/doc/ref/data/dyn_view_ref.yaml b/doc/ref/data/dyn_view_ref.yaml new file mode 100755 index 0000000000..245aa888eb --- /dev/null +++ b/doc/ref/data/dyn_view_ref.yaml @@ -0,0 +1,478 @@ +# +# C++ reference documentation for TableView class +# + +ID : class_dyn_tableview +TITLE : TableView (dynamic) +SUMMARY : &g_dyn_view_intro_summary + The TableView class. +DESCR : &g_dyn_view_intro_descr + > + Queries and searches can return TableView + objects, which works as virtual tables containing just + the matched rows. You can interact with a + TableView just as a regular table. + + A {@link class_dyn_tableview} is implicitely linked to a + {@link class_dyn_table}. All changes to the view will + propagate to the original table. This includes operations + like updating values and deleting rows. + + Notice that this does not imply that it will work the + opposite direction. Any change that adds or removes rows + in the original table will invalidate the view, and you + will have an inconsistent view of the table. This might + lead to a serious data corruption. + + It is possible to create two views for the table as + long as you do not change the original table. +SEE : +EXAMPLES : +- DESCR: + CODE: ex_cpp_dyn_view_intro +IGNORE : [] # List of method-ids to ignore +CATEGORIES : +- State: + METHODS: + - g_dyn_view_size: + NAMES : size + SUMMARY : *g_dyn_table_size_summary + DESCR : *g_dyn_table_size_descr + CONST : True + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - CODE : ex_cpp_dyn_view_size + DESCR : + - g_dyn_view_is_empty: + NAMES : is_empty + SUMMARY : &g_dyn_view_is_empty_summary + Is view empty? + DESCR : &g_dyn_view_is_empty_descr + The method checks if the view is empty that is, it has zero rows. + CONST : True + RETURN: + TYPES : bool + DESCR : true if empty, false otherwise. + EXAMPLES: + - CODE : ex_cpp_dyn_view_is_empty + DESCR : +- View: + METHODS: + - g_dyn_view_clear: + NAMES : clear + SUMMARY : *g_dyn_table_clear_summary + DESCR : &g_dyn_view_clear_descr + This method will remove all rows in a view. + EXAMPLES: + - CODE : ex_cpp_dyn_view_clear + DESCR : +- Columns: + METHODS: + - g_dyn_view_get_column_count: + NAMES : get_column_count + SUMMARY : *g_dyn_table_get_column_count_summary + DESCR : *g_dyn_table_get_column_count_descr + CONST : True + RETURN: + TYPES : size_t + DESCR : The number of columns. + EXAMPLES: + - CODE : ex_cpp_dyn_view_get_column_count + DESCR : + - g_dyn_view_get_column_name: + NAMES : get_column_name + SUMMARY : *g_dyn_table_get_column_name_summary + DESCR : *g_dyn_table_get_column_name_descr + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + RETURN: + TYPES : const char* + DESCR : The column name. + EXAMPLES: + - CODE : ex_cpp_dyn_view_get_column_name + DESCR : + - g_dyn_view_get_column_index: + NAMES : get_column_index + SUMMARY : *g_dyn_table_get_column_index_summary + DESCR : *g_dyn_table_get_column_index_descr + CONST : True + PARAMS: + - NAME : column_name + TYPES : const char* + DESCR : The column name. + RETURN: + TYPES : size_t + DESCR : The column index. + EXAMPLES: + - CODE : ex_cpp_dyn_view_get_column_index + DESCR : + - g_dyn_view_get_column_type: + NAMES : get_column_type + SUMMARY : *g_dyn_table_get_column_type_summary + DESCR : *g_dyn_table_get_column_type_descr + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + RETURN: + TYPES : DataType + DESCR : The column type. + EXAMPLES: + - CODE : ex_cpp_dyn_view_get_column_type + DESCR : +- Rows: + METHODS: + - g_dyn_view_get_source_ndx: + NAMES : get_source_ndx + SUMMARY : &g_dyn_view_get_source_ndx_summary + Get source index. + DESCR : &g_dyn_view_get_source_ndx_descr + This method will get the index of the row in the source table. + CONST : True + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : The row index in the view + RETURN: + TYPES : size_t + DESCR : The row index in the table. + EXAMPLES: + - CODE : ex_cpp_dyn_view_get_source_ndx + DESCR : + - g_dyn_view_remove_row: + NAMES : remove + SUMMARY : *g_dyn_table_remove_row_summary + DESCR : *g_dyn_table_remove_row_descr + SIGNATURE: void remove(size_t row_ndx); + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : Position of row to delete. + EXAMPLES: + - CODE : ex_cpp_dyn_table_remove + DESCR : + - g_dyn_view_remove_last_row: + NAMES : remove_last + SUMMARY : *g_dyn_table_remove_last_row_summary + DESCR : *g_dyn_table_remove_last_row_descr + SIGNATURE: void remove_last(); + EXAMPLES: + - CODE : ex_cpp_dyn_table_remove_last_row + DESCR : +- Values: + METHODS: + - g_dyn_view_get_bool: + - g_dyn_view_get_int: + - g_dyn_view_get_float: + - g_dyn_view_get_double: + - g_dyn_view_get_date: + - g_dyn_view_get_string: + - g_dyn_view_get_binary: + - g_dyn_view_get_mixed: + - g_dyn_view_get_mixed_type: + - g_dyn_view_get_subtable: + - g_dyn_view_get_subtable_const: + NAMES : get_* + SUMMARY : *g_dyn_table_get_xxx_summary + DESCR : *g_dyn_table_get_xxx_descr + SIGNATURE: | + bool get_bool(size_t column_ndx, size_t row_ndx) const; + int64_t get_int(size_t column_ndx, size_t row_ndx) const; + float get_float(size_t column_ndx, size_t row_ndx) const; + double get_double(size_t column_ndx, size_t row_ndx) const; + time_t get_date(size_t column_ndx, size_t row_ndx) const; + const char* get_string(size_t column_ndx, size_t row_ndx) const; + BinaryData get_binary(size_t column_ndx, size_t row_ndx) const; + Mixed get_mixed(size_t column_ndx, size_t row_ndx) const; + DataType get_mixed_type(size_t column_ndx, size_t row_ndx) const + TableRef get_subtable(size_t column_ndx, size_t row_ndx); + ConstTableRef get_subtable(size_t column_ndx, size_t row_ndx) const; + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + RETURN: + TYPES : [bool, int64_t, float, double, time_t, const char*, BinaryData, Mixed, DataType, TableRef, ConstTableRef] + DESCR : The value. + EXAMPLES: + - CODE : ex_cpp_dyn_view_get_xxx + DESCR : + - g_dyn_view_set_bool: + - g_dyn_view_set_int: + - g_dyn_view_set_float: + - g_dyn_view_set_double: + - g_dyn_view_set_enum: + - g_dyn_view_set_date: + - g_dyn_view_set_string: + - g_dyn_view_set_binary: + - g_dyn_view_set_mixed: + NAMES : set_* + SUMMARY : *g_dyn_table_set_xxx_summary + DESCR : *g_dyn_table_set_xxx_descr + SIGNATURE: | + void set_bool(size_t column_ndx, size_t row_ndx, bool value); + void set_int(size_t column_ndx, size_t row_ndx, int64_t value); + void set_float(size_t column_ndx, size_t row_ndx, float value); + void set_double(size_t column_ndx, size_t row_ndx, double value); + template void set_enum(size_t column_ndx, size_t row_ndx, E value); + void set_date(size_t column_ndx, size_t row_ndx, time_t value); + void set_string(size_t column_ndx, size_t row_ndx, const char* value); + void set_binary(size_t column_ndx, size_t row_ndx, const char* value, size_t len); + void set_mixed(size_t column_ndx, size_t row_ndx, Mixed value); + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*, Mixed] + DESCR : The value. + - NAME : len + TYPES : size_t + DESCR : Size in bytes of binary value. + EXAMPLES: + - CODE : ex_cpp_dyn_view_set_xxx + DESCR : +- Sub-tables: + METHODS: + - g_dyn_view_get_subtable_size: + NAMES : get_subtable_size + SUMMARY : *g_dyn_table_get_subtable_size_summary + DESCR : *g_dyn_table_get_subtable_size_descr + CONST : true + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + RETURN: + TYPES : size_t + DESCR : Number of rows. + EXAMPLES: + - CODE : ex_cpp_dyn_view_get_subtable + DESCR : + - g_dyn_view_clear_subtable: + NAMES : clear_subtable + SUMMARY : *g_dyn_table_clear_subtable_summary + DESCR : *g_dyn_table_clear_subtable_descr + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + EXAMPLES: + - CODE : ex_cpp_dyn_view_clear_subtable + DESCR : +- Searching: + METHODS: + - g_dyn_view_find_first_bool: + - g_dyn_view_find_first_int: + - g_dyn_view_find_first_float: + - g_dyn_view_find_first_double: + - g_dyn_view_find_first_date: + - g_dyn_view_find_first_string: + NAMES : find_first_* + SUMMARY : *g_find_first_xxx_summary + DESCR : *g_find_first_xxx_descr + SIGNATURE: | + size_t find_first_int(size_t column_ndx, int64_t value) const; + size_t find_first_bool(size_t column_ndx, bool value) const; + size_t find_first_float(size_t column_ndx, float value) const; + size_t find_first_double(size_t column_ndx, double value) const; + size_t find_first_date(size_t column_ndx, time_t value) const; + size_t find_first_string(size_t column_ndx, const char* value) const; + CONST : True + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*] + DESCR : The value. + RETURN: + TYPES : size_t + DESCR : "The row index or tightdb::not_found (equal to std::size_t(-1)) if there is no match." + EXAMPLES: + - CODE : ex_cpp_dyn_view_find_first_xxx + DESCR : + - g_dyn_view_find_all_bool: + - g_dyn_view_find_all_int: + - g_dyn_view_find_all_float: + - g_dyn_view_find_all_double: + - g_dyn_view_find_all_date: + - g_dyn_view_find_all_string: + - g_dyn_view_find_all_bool_const: + - g_dyn_view_find_all_int_const: + - g_dyn_view_find_all_float_const: + - g_dyn_view_find_all_double_const: + - g_dyn_view_find_all_date_const: + - g_dyn_view_find_all_string_const: + NAMES : find_all_* + SUMMARY : *g_find_all_xxx_summary + DESCR : *g_find_all_xxx_descr + SIGNATURE: | + TableView find_all_int(size_t column_ndx, int64_t value); + TableView find_all_bool(size_t column_ndx, bool value); + TableView find_all_date(size_t column_ndx, time_t value); + TableView find_all_string(size_t column_ndx, const char* value); + TableView find_all_float(size_t column_ndx, float value); + TableView find_all_double(size_t column_ndx, double value); + + ConstTableView find_all_int(size_t column_ndx, int64_t value) const; + ConstTableView find_all_bool(size_t column_ndx, bool value) const; + ConstTableView find_all_date(size_t column_ndx, time_t value) const; + ConstTableView find_all_string(size_t column_ndx, const char* value) const; + ConstTableView find_all_float(size_t column_ndx, float value) const; + ConstTableView find_all_double(size_t column_ndx, double value) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*] + DESCR : The value. + RETURN: + TYPES : [TableView, ConstTableView] + DESCR : The view. + EXAMPLES: + - CODE : ex_cpp_dyn_view_find_all_xxx + DESCR : + - g_dyn_view_sort: + NAMES : sort + SUMMARY : &g_dyn_view_get_sorted_view_summary + Sort the view. + DESCR : &g_dyn_view_get_sorted_view_desc + This method will sort the rows by using values of a given column. + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : The column index. + - NAME : ascending + TYPES : bool + DESCR : "If true, rows are sorted ascending. Default: true." + EXAMPLES: + - CODE : ex_cpp_dyn_view_sort + DESCR : +- Aggregates: + METHODS: + - g_dyn_view_sum: + - g_dyn_view_sum_float: + - g_dyn_view_sum_double: + NAMES : [sum, sum_float, sum_double] + SUMMARY : &g_dyn_view_sum_summary + Calculates the sum. + DESCR : &g_dyn_view_sum_descr + Calculates the sum of a column. + CONST : True + SIGNATURE: | + int64_t sum(size_t column_ndx) const; + double sum_float(size_t column_ndx) const; + double sum_double(size_t column_ndx) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : [int64_t, float, double] + DESCR : The sum. + EXAMPLES: + - CODE : ex_cpp_dyn_view_sum + DESCR : + - g_dyn_view_maximum: + - g_dyn_view_maximum_float: + - g_dyn_view_maximum_double: + NAMES : [maximum, maximum_float, maximum_double] + SUMMARY : &g_dyn_view_maximum_summary + Find highest value. + DESCR : &g_dyn_view_maximum_descr + Find the highest value. + CONST : True + SIGNATURE: | + int64_t maximum(size_t column_ndx) const; + double maximum_float(size_t column_ndx) const; + double maximum_double(size_t column_ndx) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : [int64_t, double] + DESCR : The maximum value. + EXAMPLES: + - CODE : ex_cpp_dyn_view_maximum + DESCR : + - g_dyn_view_minimum: + - g_dyn_view_minimum_float: + - g_dyn_view_minimum_double: + NAMES : [minimum, minimum_float, minimum_double] + SUMMARY : &g_dyn_view_minimum_summary + Find lowest value. + DESCR : &g_dyn_view_minimum_descr + Find the lowest value. + CONST : True + SIGNATURE: | + int64_t minimum(size_t column_ndx) const; + double minimum_float(size_t column_ndx) const; + double minimum_double(size_t column_ndx) const; + PARAMS: + - NAME : column_ndx + TYPES : size_t + DESCR : Column index. + RETURN: + TYPES : [int64_t, double] + DESCR : The minimum value. + EXAMPLES: + - CODE : ex_cpp_dyn_view_minimum + DESCR : +- Dump: + METHODS: + - g_dyn_view_to_json: + NAMES : to_json + SUMMARY : *g_dyn_table_to_json_summary + DESCR : &g_dyn_view_to_json_descr + The JavaScript Object Notation (JSON) is useful for + web/mobile applications and serialization. This + method will convert a view and its columns and rows + to a JSON compatible representation. + PARAMS: + - NAME : out + TYPES : std::ostream& + DESCR : Output stream. + EXAMPLES: + - CODE : ex_cpp_dyn_view_to_json + DESCR : + - g_dyn_view_to_string: + NAMES : to_string + SUMMARY : &g_dyn_view_to_string_summary + Convert view to a string. + DESCR : &g_dyn_view_to_string_descr + This method will convert a view and its columns and rows to a format + which is easily read by humans. + CONST : true + PARAMS: + - NAME : out + TYPES : std::ostream& + DESCR : Output stream. + - NAME : limit + TYPES : size_t + DESCR : "The number of rows to convert. Default: 500." + EXAMPLES: + - CODE : ex_cpp_dyn_view_to_string + DESCR : diff --git a/doc/ref/data/group_ref.yaml b/doc/ref/data/group_ref.yaml new file mode 100755 index 0000000000..6405ef9c85 --- /dev/null +++ b/doc/ref/data/group_ref.yaml @@ -0,0 +1,127 @@ +# +# Obj-C reference documentation for Group class +# + +#INCONSISTENCY the parameters mode and take_ownership are not implemented in constructors +#UNIMPLEMENTED open() and is_attached() + +#UNDOCUMENTED: [commit, to_json, get_table_typed] + +ID : class_group +TITLE : Group +SUMMARY : *g_group_summary +DESCR : *g_group_descr +SEE : +EXAMPLES: +- DESCR : + CODE : #ex_objc_group_intro +IGNORE : [] # List of method-ids to ignore +CATEGORIES: +- Constructor: + METHODS: + - g_group_constructor_plain: + - g_group_constructor_file: + - g_group_constructor_memory: + NAMES : Group + DESCR : *g_group_constructor_descr + SUMMARY : *g_group_constructor_summary + SIGNATURE: | + (TightdbGroup *)groupWithFilename:(NSString *)filename; + (TightdbGroup *)groupWithBuffer:(const char*)data size:(size_t)size; + (TightdbGroup *)group; + PARAMS: + - NAME : filename + TYPES : const std::string& + DESCR : Filesystem path of the TightDB database file to be opened. + - NAME : data + TYPES : Group::BufferSpec + DESCR : A pointer to an in-memory binary encoded representation of a group. + - NAME : size + TYPES : Group::BufferSpec + DESCR : Size of the binary which data points at. + RETURN: + TYPES : Group + DESCR : A - possibly empty - group. + THROWS: + - EXCEPT : TBD + DESCR : TBD + EXAMPLES: + - DESCR : + CODE : #ex_cpp_group_constructor_plain + - DESCR : + CODE : #ex_cpp_group_constructor_file + - DESCR : + CODE : #ex_cpp_group_constructor_memory +- Table: + METHODS: + - g_group_has_table: + NAMES : has_table + SUMMARY : *g_group_has_table_summary + DESCR : *g_group_has_table_descr + SIGNATURE: (BOOL)hasTable:(NSString *)name withClass:(Class)obj; + PARAMS: + - NAME : name + TYPES : NSString + DESCR : Name of the table you wish to look for. + - NAME : obj + TYPES : Class + DESCR : Class type for compatibility test. + RETURN: + TYPES : bool + DESCR : true if the table exits, otherwise true. + EXAMPLES: + - DESCR : + CODE : ex_cpp_group_optional_table + - g_group_get_table: + NAMES : get_table + SUMMARY : *g_group_get_table_summary + DESCR : *g_group_get_table_descr + SIGNATURE: | + (TightdbTable *)getTable:(NSString *)name; + (id)getTable:(NSString *)name withClass:(Class)obj; + PARAMS: + - NAME : name + TYPES : NSString + DESCR : Name of the table you wish to look for. + - NAME : obj + TYPES : Class + DESCR : Specifies a static type for the returned table accessor. + RETURN: + TYPES : [TableRef, ConstTableRef] + DESCR : A table reference object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_group_traverse + - DESCR : + CODE : ex_cpp_group_optional_table + SEE : "{@link g_group_has_table}" +- IO: + METHODS: + - g_group_write_to_file: + NAMES : write + SUMMARY : *g_group_write_to_file_summary + DESCR : *g_group_write_to_file_descr + SIGNATURE: | + (void)write:(NSString *)filePath; + PARAMS: + - NAME : filePath + TYPES : const std::string& + DESCR : A filesystem path. + THROWS: + - EXCEPT : TBD + DESCR : TBD + EXAMPLES: + - DESCR : + CODE : ex_cpp_group_write_to_file + - g_group_write_to_mem: + NAMES : write_to_mem + SUMMARY : *g_group_write_to_mem_summary + DESCR : *g_group_write_to_mem_descr + SIGNATURE: | + (const char*)writeToMem:(size_t*)size; + RETURN: + DESCR : The allocated buffer. You will have to call free() when you are done with it. + TYPES : Group::BufferSpec + EXAMPLES: + - DESCR : + CODE : ex_cpp_group_write_to_mem \ No newline at end of file diff --git a/doc/ref/data/mixed_ref.yaml b/doc/ref/data/mixed_ref.yaml new file mode 100755 index 0000000000..f7264da7ec --- /dev/null +++ b/doc/ref/data/mixed_ref.yaml @@ -0,0 +1,90 @@ +# +# C++ reference documentation for Mixed class +# + +ID : class_mixed +TITLE : Mixed +SUMMARY : &g_mixed_summary + Flexible data type. +DESCR : &g_mixed_descr + The Mixed class is a light-weight implementation of a flexible type system. Once + a variable is given a value via a constructor, it is not possible to modify the + value. Any supported type of TightDB can be used with the Mixed class. The current + supported types are boolean, integer, timestamps, strings, binary data and + {@link class_dyn_table}. + + Using the Mixed class resembles using a dynamic typed language. The flexibility + of mixing types has a cost as compacting data is harder and queries will generally + be slower. +SEE : +EXAMPLES: +- DESCR : + CODE : ex_cpp_group_intro +IGNORE : [] # List of method-ids to ignore +CATEGORIES: +- Constructors: + METHODS: + - g_mixed_constructor: + NAMES : Mixed + SUMMARY : &g_mixed_constructor_summary + Create a Mixed variable. + DESCR : &g_mixed_constructor_descr + > + Mixed typed variables are instances of the Mixed class. Mixed typed values add a high + degree of flexibility to schemas. + SIGNATURE: | + Mixed(bool v) + Mixed(int64_t v) + Mixed(float v) + Mixed(double v) + Mixed(Date v) + Mixed(const char* v) + Mixed(BinaryData v) + Mixed(subtable_tag) + PARAMS: + - NAME : v + TYPES : [bool, int64_t, float, double, Date, const char*, BinaryData] + DESCR : The value. + EXAMPLES: + - CODE : ex_cpp_mixed_constructor + DESCR : +- Getters: + METHODS: + - g_mixed_get_type: + NAMES : get_type + SUMMARY : &g_mixed_get_type_summary + Get the type. + DESCR : &g_mixed_get_type_descr + This method retrieves the real type of a Mixed variable. + CONST : True + RETURN: + TYPES : DataType + DESCR : The type. + EXAMPLES: + - CODE : ex_cpp_mixed_get_type + DESCR : + - g_mixed_get_bool: + - g_mixed_get_int: + - g_mixed_get_date: + - g_mixed_get_string: + - g_mixed_get_binary: + NAMES : get_* + SUMMARY : &g_mixed_get_value_summary + Get value of Mixed variable. + DESCR : &g_mixed_get_value_descr + The value of a Mixed typed variable is retrieved by this method. + SIGNATURE: | + bool get_bool() const; + int64_t get_int() const; + std::time_t get_date() const; + float get_float() const; + double get_double() const; + const char* get_string() const; + BinaryData get_binary() const; + CONST : True + RETURN: + TYPES : [bool, int64_t, float, double, time_t, const char*, BinaryData] + DESCR : The value. + EXAMPLES: + - CODE : ex_cpp_mixed_get_value + DESCR : diff --git a/doc/ref/data/reference.yaml b/doc/ref/data/reference.yaml new file mode 100644 index 0000000000..9ecd3a379b --- /dev/null +++ b/doc/ref/data/reference.yaml @@ -0,0 +1,66 @@ +# +# Reference documentation data for language Java +# +ID : objc +TITLE : 'Objective-C' +DESCR : > + The goal of TightDB is to provide a high performance + data storage for your applications. + + TightDB integrates seamless in Objective-C, making it + fast to learn and easy to use. You can replace your traditional data + structures with TightDB. Whether it is a simple array of integers or a + complex structure, you interface to TightDB as easily as using a + standard array like container. But in addition you can + handle much more data in much less space, you get powerful query + possibilities in an intuitive language and the ability to share your data + across all supported languages and platforms. + + The core of the framework is the class {@link class_table}. The + class is a representation of the + fundamental concept Table. You can use + {@link class_table} in the situations where you know the table structure + a priori or when the data structure changes dynamically through the run time + of the application. + + Tables organize data in columns and rows and data is compacted for + low memory usage. The interface to the data resembles the native + data structures. Moreover, tables can have nested tables as data. Using subtables + and mixed types you can build arbitrarily complex data structures. + + It is possible to query data using the {@link class_query} and + class. Queries can be complex - involving + any number of columns and values. You can either apply aggregate functions to you + resulting data set or use the data set in your application as a + {@link class_tableview} object. + + The {@link class_group} class lets you serialize tables to disk or memory. The + TightDB data format is consistent across operating systems, hardware platforms, + and programming languages. This implies that you can share data across applications + and environments. For multi-threaded or multi-process applications, you can + use the {@link class_shared_group}. + +IMPORT : [reference, typed_table_ref, dyn_table_ref, dyn_query_ref, group_ref, typed_view_ref, dyn_view_ref, shared_group_ref] +IMPORTPATH: ../../tightdb/doc/ref_cpp/data + + +CATEGORIES: # list global class-id in order of appearence +- Typed Table: # Category header name + - typed_table # Global Class name. File: 'typed_table_ref.yaml' +# - typed_view +# - typed_query +- Dynamic Table: +# - dyn_table +# - dyn_view +# - dyn_query +- Collection: + - group +# - shared_group +- Helpers: +# - mixed +# - cursor + +EXAMPLES : +- DESCR : + CODE : #ex_cpp_intro # id to example code + diff --git a/doc/ref/data/shared_group_ref.yaml b/doc/ref/data/shared_group_ref.yaml new file mode 100755 index 0000000000..0486e8649e --- /dev/null +++ b/doc/ref/data/shared_group_ref.yaml @@ -0,0 +1,274 @@ +# +# C++ reference documentation for Shared Group class +# + +ID : class_shared_group +TITLE : SharedGroup +SUMMARY : &g_shared_group_summary + Sharing groups +DESCR : &g_shared_group_descr + > + Database files can be shared across running applications. + + When two threads or processes want to access the same + database file, they must each create their own + instance of SharedGroup. + + If the database file does not already exist, it will + be created. When multiple threads are involved, it is + safe to let the first thread, that gets to it, create + the file. + + While at least one instance of SharedGroup exists for + a specific database file, a lock file will exist + too. The lock file will be placed in the same + directory as the database file, and its name is + derived by adding the suffix '.lock' to the name of + the database file. + + Processes that share a database file must reside on + the same host. + + Moreover, the class also provide a transactional + interface to TightDB. Transactions are divided into + read and write transactions. While read transactions + do not modify the table and thereby the group, write + transactions do. This division is important to remember + as derived objects (tables, views, etc.) are either + writable or not. +SEE : +EXAMPLES: +- DESCR : + CODE : ex_sharedgroup_intro +IGNORE : [] +CATEGORIES: +- Constructor: + METHODS: + - g_shared_group_constructor: + NAMES : SharedGroup + SUMMARY : &g_shared_group_constructor_summary + Create a shared group. + DESCR : &g_shared_group_constructor_descr + > + Open a shared group (will be created if it does not already exist). + + By default the shared group will be fully durable, so that each commit writes its changes + to disk in an atomic manner that guarantees that the file is always consistent. + + If your data is transient, and does not need to persist to disk (like for caching or + shared state between processes). You can open the shared group in mem-only mode. Then the + file will just be used for identification and backing and will be removed again when there + are no more processes using it. + + Note that a shared group can only be opened in the mode it was created in. + + A SharedGroup may also be constructed in an unattached + state (2). See open() and is_attached() for more on + this. + SIGNATURE: > + SharedGroup(const std::string& file, bool no_create = false, DurabilityLevel dlevel); + SharedGroup(unattached_tag); + PARAMS: + - NAME : file + TYPES : const std::string& + DESCR : Filesystem path of the TightDB database file to be opened. + - NAME : no_create + TYPES : bool + DESCR : If set to true, File::NotFound will be thrown + if the file does not already exist. + - NAME : dlevel + TYPES : DurabilityLevel + DESCR : Durability Level (durability_Full or durability_MemOnly) + RETURN: + TYPES : SharedGroup + DESCR : A shared group. + THROWS: + - EXCEPT : File::OpenError + DESCR : If the file could not be opened. If the reason + corresponds to one of the exception types that are + derived from File::OpenError, the derived exception + type is thrown. Note that InvalidDatabase is among + these derived exception types. + EXAMPLES: + - CODE : ex_cpp_shared_group_constructor + DESCR : +- Utilities: + METHODS: + - g_shared_group_open: + NAMES : open + SUMMARY : &g_shared_group_open_summary + Is this SharedGroup instance in its attached state? + DESCR : &g_shared_group_open_descr + Attach this SharedGroup instance to the specified + database file. + + If the database file does not already exist, it will + be created (unless no_create is set to + true.) When multiple threads are involved, it is safe + to let the first thread, that gets to it, create the + file. + + While at least one instance of SharedGroup exists for + a specific database file, a "lock" file will be + present too. The lock file will be placed in the same + directory as the database file, and its name will be + derived by appending ".lock" to the name of the + database file. + + When multiple SharedGroup instances refer to the same + file, they must specify the same durability level, + otherwise an exception will be thrown. + + Calling open() on a SharedGroup instance that is + already in the attached state has undefined behavior. + PARAMS: + - NAME : file + TYPES : const std::string& + DESCR : Filesystem path of the TightDB database file to be opened. + - NAME : no_create + TYPES : bool + DESCR : If set to true, File::NotFound will be thrown + if the file does not already exist. + - NAME : dlevel + TYPES : DurabilityLevel + DESCR : Durability Level (durability_Full or durability_MemOnly) + THROWS: + - EXCEPT : File::OpenError + DESCR : If the file could not be opened. If the reason + corresponds to one of the exception types that are + derived from File::OpenError, the derived exception + type is thrown. Note that InvalidDatabase is among + these derived exception types. + EXAMPLES: + - DESCR : + CODE : ex_cpp_shared_group_open + - g_shared_group_is_attached: + NAMES : is_attached + SUMMARY : &g_shared_group_is_attached_summary + Is this SharedGroup instance in its attached state? + DESCR : &g_shared_group_is_attached_descr + A shared group may be created in the unattached + state, and then later attached to a file with a call + to one of the open() methods. Calling any method + other than open(), is_attached(), and ~SharedGroup() + on an unattached instance results in undefined + behavior. + CONST : true + RETURN: + TYPES : bool + DESCR : true if attached, false otherwise. + EXAMPLES: + - DESCR : + CODE : ex_cpp_shared_group_is_attached + - g_shared_group_has_changed: + NAMES : has_changed + SUMMARY : &g_shared_group_has_changed_summary + Has shared group been changed since last transaction? + DESCR : &g_shared_group_has_changed_descr + > + This method tests if the shared group has been modified (by another process), + since the last transaction. + + It has very little overhead and does not affect other processes, so it is + ok to call it at regular intervals (like in the idle handler of an application). + RETURN: + TYPES : bool + DESCR : true if it has changed, false otherwise. + EXAMPLES: + - CODE : ex_cpp_shared_group_has_changed + DESCR : +- Write transactions: + METHODS: + - g_shared_group_begin_write: + NAMES : begin_write + SUMMARY : &g_shared_group_begin_write_summary + Initiate a transaction. + DESCR : &g_shared_group_begin_write_descr + Begin writing to a shared group. + RETURN: + TYPES : Group& + DESCR : A group. + EXAMPLES: + - CODE : ex_cpp_shared_group_begin_write + DESCR : + - g_shared_group_begin_commit: + NAMES : commit + SUMMARY : &g_shared_group_commit_summary + Commit a transaction. + DESCR : &g_shared_group_commit_descr + This method closes a transaction and changes are written to the group. + EXAMPLES: + - CODE : ex_cpp_shared_group_commit + DESCR : + - g_shared_group_rollback: + NAMES : rollback + SUMMARY : &g_shared_group_rollback_summary + Rollback a transaction. + DESCR : &g_shared_group_rollback_descr + This method descards all changes. + EXAMPLES: + - CODE : ex_cpp_shared_group_rollback + DESCR : + - g_shared_group_interrupt_transact: + NAMES : interrupt_transact + SUMMARY : &g_shared_group_interrupt_transact_summary + Interrupt any blocking call. + DESCR : &g_shared_group_interrupt_transact_descr + > + This function may be called asynchronously to interrupt any + blocking call that is part of a transaction in a replication + setup. Only {@link g_shared_group_begin_write} and + modifying function that are part + of a write transaction can block. The transaction is + interrupted only if such a call is blocked or would + block. This function may be called from a different thread. It + may not be called directly from a system signal handler. When + a transaction is interrupted, the only valid member function + to call is {@link g_shared_group_rollback}. If a client calls + {@link g_shared_group_clear_interrupt_transact} after having + called {@link g_shared_group_rollback}, it + may then resume normal operation on this database/shared group. + Currently, + transaction interruption works by throwing an exception from + one of the mentioned member functions that may block. + EXAMPLES: + - CODE : ex_cpp_shared_group_interrupt_transact + DESCR : + - g_shared_group_clear_interrupt_transact: + NAMES : clear_interrupt_transact + SUMMARY : &g_shared_group_clear_interrupt_transact_summary + Clean up interrupted state. + DESCR : &g_shared_group_clear_interrupt_transact_descr + > + This method clears the interrupted state of the shared group after rolling + back a transaction. It is not an error to call this function + in a situation where no interruption has occured. + SEE : g_shared_group_interrupt_transact + EXAMPLES: + - CODE : ex_cpp_shared_group_clear_interrupt_transact + DESCR : +- Read transactions: + METHODS: + - g_shared_group_begin_read: + NAMES : begin_read + SUMMARY : &g_shared_group_begin_read_summary + Initiate reading. + DESCR : &g_shared_group_begin_read_descr + Begin reading from a shared group. + CONST : True + RETURN: + TYPES : Group& + DESCR : A group. + EXAMPLES: + - CODE : ex_cpp_shared_group_begin_read + DESCR : + - g_shared_group_end_read: + NAMES : end_read + SUMMARY : &g_shared_group_end_read_summary + Stop reading from a group. + DESCR : &g_shared_group_end_read_descr + This method stops reading from a shared group. + EXAMPLES: + - CODE : ex_cpp_shared_group_end_read + DESCR : + diff --git a/doc/ref/data/typed_query_ref.yaml b/doc/ref/data/typed_query_ref.yaml new file mode 100755 index 0000000000..e11376ddac --- /dev/null +++ b/doc/ref/data/typed_query_ref.yaml @@ -0,0 +1,650 @@ +# +# C++ reference documentation for Query class +# + +ID : class_typed_query +TITLE : Query (typed) +SUMMARY : &g_typed_query_intro_summary + Query your TightDB table. +DESCR : &g_typed_query_intro_descr + > + Query objects are used to build up queries. A query is tied to a + {@link class_typed_table}. The typed query class is used in conjunction with + {@link class_typed_table}. + + Conditions is added to a query through a + fluent interface. + This means that the methods representing the conditions will return the + query object. + + Conditions are split in two parts: the column name and a method for each + predicate. Conditions are folded with logical-and if not stated otherwise. + + Once the query is ready, it is possible to reuse by multiple calls to + the action methods. + Moreover, it is possible extend the query with new conditions after applying an + action method and thereby implement a drill-down. It is important to stress that + no data is cached, and the new queries cannot benefit from previous queries. + + Alternatively, a query can result in a {@link class_typed_tableview} which can be further + queried. +SEE : +EXAMPLES : +- DESCR: + CODE: ex_cpp_typed_query_intro +IGNORE : [] +CATEGORIES : +- Conditions: + METHODS: + - g_typed_query_equals_boolean: + - g_typed_query_equals_integer: + - g_typed_query_equals_float: + - g_typed_query_equals_double: + - g_typed_query_equals_string: + - g_typed_query_equals_date: + - g_typed_query_equals_binary: + NAMES : [ equal, equal_date, equal_binary ] + SIGNATURE: | + Query& equal(bool value); + Query& equal(int64_t value); + Query& equal(float value); + Query& equal(double value); + Query& equal(const char* value, bool case_sensitive=true); + Query& equal_date(time_t value); + Query& equal_binary(const char* data, size_t size); + SUMMARY : &g_typed_query_equals_summary + Equal to. + DESCR : &g_typed_query_equals_descr + Queries for column values equals to a certain value. + PARAMS: + - NAME : value + TYPES : [bool, int64_t, float, double, const char*, time_t] + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : &g_typed_query_case_sensitive_descr + 'String match can be performed case sensitive or not. Default: true.' + - NAME : data + TYPES : const char* + DESCR : Pointer to a chunk of binary data. + - NAME : size + TYPES : size_t + DESCR : Size of binary data chunk. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_equals + - g_typed_query_notEquals_boolean: + - g_typed_query_notEquals_integer: + - g_typed_query_notEquals_float: + - g_typed_query_notEquals_double: + - g_typed_query_notEquals_string: + - g_typed_query_notEquals_date: + - g_typed_query_notEquals_binary: + NAMES : [ not_equal, not_equal, not_equal_binary ] + SIGNATURE: | + Query& not_equal(bool value); + Query& not_equal(int64_t value); + Query& not_equal(float value); + Query& not_equal(double value); + Query& not_equal(const char* value, bool case_sensitive=true); + Query& not_equal_date(time_t value); + Query& not_equal_binary(const char* data, size_t size); + SUMMARY : &g_typed_query_notEquals_summary + Not equal to. + DESCR : &g_typed_query_notEquals_descr + Queries for column values not equals to a certain value. + PARAMS: + - NAME : value + TYPES : [bool, int64_t, float, double, const char*, time_t] + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : 'String match can be performed case sensitive or not. Default: true.' + - NAME : data + TYPES : const char* + DESCR : Pointer to a chunk of binary data. + - NAME : size + TYPES : size_t + DESCR : Size of binary data chunk. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_notEquals + - g_typed_query_greaterThan: + - g_typed_query_greaterThan_float: + - g_typed_query_greaterThan_double: + - g_typed_query_greaterThan_date: + NAMES : [ greater, greater, greater, greater_date ] + SIGNATURE: | + Query& greater(int64_t value); + Query& greater(float value); + Query& greater(double value); + Query& greater_date(time_t value); + SUMMARY : &g_typed_query_greaterThan_summary + Greater than. + DESCR : &g_typed_query_greaterThan_descr + Queries for column values greater than a certain value. + PARAMS: + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_greaterThan + - g_typed_query_greaterThanOrEqual: + - g_typed_query_greaterThanOrEqual_date: + NAMES : [ greater_equal, greater_equal_date ] + SIGNATURE: | + Query& greater_equal(int64_t value); + Query& greater_equal(float value); + Query& greater_equal(double value); + Query& greater_equal_date(time_t value); + SUMMARY : &g_typed_query_greaterThanOrEqual_summary + Greater than or equal to. + DESCR : &g_typed_query_greaterThanOrEqual_descr + Queries for column values greater than or equal to a specified value. + PARAMS: + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_greaterThanOrEqual + - g_typed_query_lessThan: + - g_typed_query_lessThan_date: + NAMES : [less, less_date] + SIGNATURE: | + Query& less(int64_t value); + Query& less(float value); + Query& less(double value); + Query& less_date(time_t value); + SUMMARY : &g_typed_query_lessThan_summary + Less than. + DESCR : &g_typed_query_lessThan_descr + Queries for column values less than a specified value. + PARAMS: + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_lessThan + - g_typed_query_lessThanOrEqual: + - g_typed_query_lessThanOrEqual_date: + NAMES : [less_equal, less_equal_date] + SIGNATURE: | + Query& less_equal(int64_t value); + Query& less_equal(float value); + Query& less_equal(double value); + Query& less_equal_date(time_t value); + SUMMARY : &g_typed_query_lessThanOrEqual_summary + Less than or equal to. + DESCR : &g_typed_query_lessThanOrEqual_descr + Queries for column values less than or equal to a certain value. + PARAMS: + - NAME : value + TYPES : [int64_t, float, double, time_t] + DESCR : The value. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_lessThanOrEqual + - g_typed_query_between: + - g_typed_query_between_date: + NAMES : [between, between_date] + SIGNATURE: | + Query& between(int64_t from, int64_t to); + Query& between(float from, float to); + Query& between(double from, double to); + Query& between_date(time_t from, time_t to); + DESCR : &g_typed_query_between_descr + Queries for column values in ranges. + SUMMARY : &g_typed_query_between_summary + Belongs to an interval. + PARAMS: + - NAME : from + TYPES : [int64_t, float, double, time_t] + DESCR : Lower bound of range. + - NAME : to + TYPES : [int64_t, time_t] + DESCR : Upper bound of range. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_between + - g_typed_query_startsWith: + - g_typed_query_startsWith_binary: + NAMES : [begins_with, begins_with_binary] + SIGNATURE: | + Query& begins_with(const char* value, bool case_sensitive=true); + Query& begins_with_binary(const char* data, size_t size); + DESCR : &g_typed_query_startsWith_descr + Queries for column values which begin with a certain prefix. + SUMMARY : &g_typed_query_startsWith_summary + Substring match at the begining of the attribute. + PARAMS: + - NAME : value + TYPES : const char* + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : *g_typed_query_case_sensitive_descr + - NAME : data + TYPES : const char* + DESCR : Pointer to a chunk of binary data. + - NAME : size + TYPES : size_t + DESCR : Size of binary data chunk. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_startsWith + - g_typed_query_endsWith: + - g_typed_query_endsWith_binary: + NAMES : [ends_with, ends_with_binary] + SIGNATURE: | + Query& ends_with(const char* value, bool case_sensitive=true); + Query& ends_with_binary(const char* data, size_t size); + DESCR : &g_typed_query_endsWith_descr + Queries for column values which end with a certain suffix. + SUMMARY : &g_typed_query_endsWith_summary + Substring match at the end at the attribute. + PARAMS: + - NAME : value + TYPES : const char* + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : *g_typed_query_case_sensitive_descr + - NAME : data + TYPES : const char* + DESCR : Pointer to a chunk of binary data. + - NAME : size + TYPES : size_t + DESCR : Size of binary data chunk. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_endsWith + - g_typed_query_contains: + - g_typed_query_contains_binary: + NAMES : [contains, contains_binary] + SIGNATURE: | + Query& contains(const char* value, bool case_sensitive=true); + Query& contains_binary(const char* data, size_t size); + DESCR : &g_typed_query_contains_descr + Queries for column values which contain a certian substring. + SUMMARY : &g_typed_query_contains_summary + Substring search. + PARAMS: + - NAME : value + TYPES : const char* + DESCR : The value. + - NAME : case_sensitive + TYPES : bool + DESCR : *g_typed_query_case_sensitive_descr + - NAME : data + TYPES : const char* + DESCR : Pointer to a chunk of binary data. + - NAME : size + TYPES : size_t + DESCR : Size of binary data chunk. + RETURN: + TYPES : Query& + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_contains +- Combiners: + METHODS: + - g_typed_query_group: + NAMES : group + DESCR : &g_typed_query_group_descr + > + Group conditions ("left" parenthesis). Group of conditions can be nested and they are + conceptually a parenthesis. + SUMMARY : &g_typed_query_group_summary + Start group ("left parenthesis"). + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_group + - g_typed_query_endGroup: + NAMES : end_group + DESCR : &g_typed_query_endGroup_descr + Group conditions ("right" parenthesis). + SUMMARY : &g_typed_query_endGroup_summary + Stop group ("right parenthesis"). + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_group + - g_typed_query_or: + NAMES : Or + DESCR : &g_typed_query_or_descr + Two conditions will be folded by logical-or. + SUMMARY : &g_typed_query_or_summary + Logical-or. + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_or + - g_typed_query_subtable: + NAMES : subtable + DESCR : &g_typed_query_subtable_descr + Query a subtable. + SUMMARY : &g_typed_query_subtable_summary + Query a subtable. + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_subtable + - g_typed_query_endSubtable: + NAMES : end_subtable + DESCR : &g_typed_query_endSubtable_descr + End of subtable query. + SUMMARY : &g_typed_query_endSubtable_summary + End of subtable query. + RETURN: + TYPES : Query + DESCR : The query object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_subtable +- Actions: + METHODS: + - g_typed_query_find_all_const: + - g_typed_query_find_all: + NAMES : find_all + DESCR : &g_typed_query_find_all_descr + Execute a query. See the {@link class_dyn_tableview} class for further details. + SUMMARY : &g_typed_query_find_all_summary + Execute query. + SIGNATURE: | + TableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + ConstTableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + PARAMS: + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [TableView, ConstTableView] + DESCR : The TableView object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_findall + - g_typed_query_find_next: + NAMES : find_next + DESCR : &g_typed_query_find_next_descr + Find next row. + SUMMARY : &g_typed_query_find_next_summary + Find next row. + PARAMS: + - NAME : lastmatch + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + RETURN: + TYPES : size_t + DESCR : Row number + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_find_next + - g_typed_query_sum: + - g_typed_query_sum_float: + - g_typed_query_sum_double: + NAMES : [sum, sum_float, sum_double] + DESCR : &g_typed_query_sum_descr + This method calculates the sum. + SUMMARY : &g_typed_query_sum_summary + Calculate sum. + CONST : true + SIGNATURE: | + int64_t sum(size_t column_ndx, size_t* resultcount, size_t start, size_t end, size_t limit) const; + double sum_float(size_t column_ndx, size_t* resultcount, size_t start, size_t end, size_t limit) const; + double sum_double(size_t column_ndx, size_t* resultcount, size_t start, size_t end, size_t limit) const; + PARAMS: + - NAME : resultcount + DESCR : The number of rows used to calculate the sum. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [int64_t, float, double] + DESCR : The sum. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_sum + - g_typed_query_size: + NAMES : count + DESCR : &g_typed_query_size_descr + Find the number of matching rows. + SUMMARY : &g_typed_query_size_summary + Number of matching rows. + CONST : true + PARAMS: + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_size + - g_typed_query_maximum_date: + - g_typed_query_maximum: + - g_typed_query_maximum_float: + - g_typed_query_maximum_double: + NAMES : [maximum, maximum_float, maximum_double] + DESCR : &g_typed_query_maximum_descr + This method finds the highest value. + SUMMARY : &g_typed_query_maximum_summary + Highest value. + CONST : true + SIGNATURE: | + int64_t maximum(size_t* resultcount, size_t start, size_t end, size_t limit) const; + float maximum_float(size_t* resultcount, size_t start, size_t end, size_t limit) const; + double maximum_double(size_t* resultcount, size_t start, size_t end, size_t limit) const; + PARAMS: + - NAME : resultcount + DESCR : The number of rows used to find the highest value. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [int64_t, float, double] + DESCR : The highest value. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_maximum + - g_typed_query_minimum: + - g_typed_query_minimum_float: + - g_typed_query_minimum_double: + NAMES : minimum + DESCR : &g_typed_query_minimum_descr + This method finds the lowest value. + SUMMARY : &g_typed_query_minimum_summary + Lowest value. + CONST : true + SIGNATURE: | + int64_t minimum(size_t* resultcount, size_t start, size_t end, size_t limit) const; + float minimum_float(size_t* resultcount, size_t start, size_t end, size_t limit) const; + double minimum_double(size_t* resultcount, size_t start, size_t end, size_t limit) const; + PARAMS: + - NAME : resultcount + DESCR : The number of rows used to find the value. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [int64_t, float, double] + DESCR : The lowest value. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_manimum + - g_typed_query_average: + - g_typed_query_average_float: + - g_typed_query_average_double: + NAMES : average + SUMMARY : &g_typed_query_average_summary + Calcualtes the average. + DESCR : &g_typed_query_average_descr + This method calcualtes the average. + CONST : true + SIGNATURE: | + double average(size_t* resultcount, size_t start, size_t end, size_t limit) const; + double average_float(size_t* resultcount, size_t start, size_t end, size_t limit) const; + double average_double(size_t* resultcount, size_t start, size_t end, size_t limit) const; + PARAMS: + - NAME : resultcount + DESCR : The number of rows used to calculate the average. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : double + DESCR : The average. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_average + - g_typed_query_remove: + NAMES : remove + DESCR : &g_typed_query_remove_descr + This method will remove all matching rows in the source table. + SUMMARY : &g_typed_query_remove_summary + Remove rows. + CONST : true + PARAMS: + - NAME : resultcount + DESCR : The number of rows used to calculate the average. + TYPES : size_t* + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : size_t + DESCR : The number of rows removed. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_remove +- Multithreaded: + METHODS: + - g_typed_query_find_all_multi: + - g_typed_query_find_all_const_multi: + NAMES : find_all_multi + DESCR : &g_typed_query_find_all_multi_descr + Execute a query using (POSIX) threads. See the {@link class_dyn_tableview} class for further details. + SUMMARY : &g_typed_query_find_all_multi_summary + Execute query. + SIGNATURE: | + TableView find_all_multi(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + ConstTableView find_all_multi(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); + + PARAMS: + - NAME : start + TYPES : size_t + DESCR : "Row to begin search. Default: 0." + - NAME : end + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + - NAME : limit + TYPES : size_t + DESCR : "Maximum number of rows to find. Default: -1 (infinity)." + RETURN: + TYPES : [TableView, ConstTableView] + DESCR : The TableView object. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_find_all_multi + - g_typed_query_set_threads: + NAMES : set_threads + SUMMARY : &g_typed_query_set_threads_summary + Set the number of threads. + DESCR : &g_typed_query_set_threads_descr + Set the number of threads. + PARAMS: + - NAME : threadcount + TYPES : unsigned int + DESCR : Number of threads. + RETURN: + DESCR : Success or not + TYPES : int + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_find_all_multi diff --git a/doc/ref/data/typed_table_ref.yaml b/doc/ref/data/typed_table_ref.yaml new file mode 100755 index 0000000000..8d6acb8af6 --- /dev/null +++ b/doc/ref/data/typed_table_ref.yaml @@ -0,0 +1,73 @@ +# +# Obj-C reference documentation for TypedTable class +# + +ID : class_typed_table +TITLE : Table (typed) +SUMMARY : *g_typed_table_summary +DESCR : *g_typed_table_descr +SEE : +EXAMPLES: +- DESCR : + CODE : ex_cpp_typed_table_intro +IGNORE : [] # List of method-ids to ignore + +CATEGORIES: +- Definition: + METHODS: + - g_typed_table_macros: + NAMES : TIGHTDB_TABLE_* + DESCR : > + This set of predefined macros is used to declare type safe table classes. + It is possible to declare table classes with 1 to 15 columns. + SIGNATURE: | + TIGHTDB_TABLE_*(ClassName, + ColumnName, ColumnType + ...) + SUMMARY : Declare type safe table classes. + PARAMS: + - NAME : "*" + TYPES : text + DESCR : "Number of columns in table (range: 1 to 15)." + - NAME : ClassName + TYPES : text + DESCR : Name of the new class. + - NAME : ColumnName + TYPES : text + DESCR : Name of column. + - NAME : ColumnType + TYPES : text + DESCR : | + Column type. Following types are available: + + + + + + + + + + + + + + + +
Name Desc C++ type
Int Integer (int64_t)
Float Floating-point(float)
Double Floating-point(double)
Bool Boolean (bool)
String Text (char*)
Date UTC datetime (time_t)
Enum<T> Enum (T as enum type)
Subtable<T> Sub-tables (T as table class)
Mixed Dynamic (contains any of the above)
+ EXAMPLES: + - CODE : ex_cpp_typed_table_macros + DESCR : +- State: + METHODS: + - g_typed_table_is_empty: + NAMES : is_empty + DESCR : *g_typed_table_is_empty_descr + SUMMARY : *g_typed_table_is_empty_summary + CONST : true + RETURN: + TYPES : bool + DESCR : *g_typed_table_true_false + EXAMPLES: + - CODE : ex_cpp_type_table_is_empty + DESCR : diff --git a/doc/ref/data/typed_view_ref.yaml b/doc/ref/data/typed_view_ref.yaml new file mode 100755 index 0000000000..9523e3ebae --- /dev/null +++ b/doc/ref/data/typed_view_ref.yaml @@ -0,0 +1,410 @@ +# +# C++ reference documentation for TableView class +# + +ID : class_typed_tableview +TITLE : TableView (typed) +SUMMARY : &g_typed_view_intro_summary + The TableView class. +DESCR : &g_typed_view_intro_descr + > + Queries and searches can return TableView + objects, which works as virtual tables containing just + the matched rows. You can interact with a + TableView just like a regular table. + + A {@link class_typed_tableview} is implicitely linked to a + {@link class_typed_table}. All changes to the view will + propagate to the original (or source) table. This includes + operations like updating values and deleting rows. + + Notice that this does not imply that it will work the + opposite direction. Any change that adds or removes rows + in the original table will invalidate the view, and you + will have an inconsistent view of the table. This might + lead to a serious data corruption. + + It is possible to create two or more views for the table as + long as you do not change the original table. +SEE : +EXAMPLES : +- DESCR: + CODE: ex_cpp_typed_view_intro +IGNORE : [] +CATEGORIES : +- State: + METHODS: + - g_typed_view_size: + NAMES : size + SUMMARY : *g_typed_table_size_summary + DESCR : *g_typed_table_size_descr + CONST : True + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - CODE : ex_cpp_typed_view_size + DESCR : + - g_typed_view_is_empty: + NAMES : is_empty + SUMMARY : &g_typed_view_is_empty_summary + Is view empty. + DESCR : &g_typed_view_is_empty_descr + This method checks if the view is empty that is, it has zero rows. + CONST : True + RETURN: + TYPES : bool + DESCR : true if empty, false otherwise. + EXAMPLES: + - CODE : ex_cpp_typed_view_is_empty + DESCR : +- View: + METHODS: + - g_typed_view_clear: + NAMES : clear + SUMMARY : *g_typed_table_clear_summary + DESCR : &g_typed_view_clear_descr + This method will remove all rows in a view. + EXAMPLES: + - CODE : ex_cpp_typed_view_clear + DESCR : +- Rows: + METHODS: + - g_typed_view_get_source_ndx: + NAMES : get_source_ndx + SUMMARY : &g_typed_view_get_source_ndx_summary + Get source index. + DESCR : &g_typed_view_get_source_ndx_descr + This method will get the index of the row in the source table. + CONST : True + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : The row index in the view. + RETURN: + TYPES : size_t + DESCR : The row index in the table. + EXAMPLES: + - CODE : ex_cpp_typed_view_get_source_ndx + DESCR : + - g_typed_view_remove_row: + NAMES : remove + SUMMARY : *g_typed_table_remove_row_summary + DESCR : *g_typed_table_remove_row_descr + SIGNATURE: void remove(size_t row_ndx); + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : Position of row to delete. + EXAMPLES: + - CODE : ex_cpp_typed_table_remove + DESCR : + - g_typed_view_remove_last_row: + NAMES : remove_last + SUMMARY : *g_typed_table_remove_last_row_summary + DESCR : *g_typed_table_remove_last_row_descr + SIGNATURE: void remove_last(); + EXAMPLES: + - CODE : ex_cpp_typed_table_remove_last_row + DESCR : +- Values: + METHODS: + - g_typed_view_get_bool: + - g_typed_view_get_float: + - g_typed_view_get_double: + - g_typed_view_get_int: + - g_typed_view_get_date: + - g_typed_view_get_string: + - g_typed_view_get_binary: + - g_typed_view_get_mixed: + - g_typed_view_get_mixed_type: + - g_typed_view_get_subtable: + - g_typed_view_get_subtable_const: + NAMES : get_* + SUMMARY : Get value. + DESCR : This method retrieves the value of a cell. + SIGNATURE: | + bool get_bool(size_t row_ndx) const; + int64_t get_int(size_t row_ndx) const; + float get_float(size_t row_ndx) const; + double get_double(size_t row_ndx) const; + time_t get_date(size_t row_ndx) const; + const char* get_string(size_t row_ndx) const; + BinaryData get_binary(size_t row_ndx) const; + Mixed get_mixed(size_t row_ndx) const; + DataType get_mixed_type(size_t row_ndx) const + TableRef get_subtable(size_t row_ndx); + ConstTableRef get_subtable(size_t row_ndx) const; + CONST : True + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + RETURN: + TYPES : [bool, int64_t, float, double, time_t, const char*, BinaryData, Mixed, DataType, TableRef, ConstTableRef] + DESCR : The value. + EXAMPLES: + - CODE : ex_cpp_typed_view_get_xxx + DESCR : + - g_typed_view_set_bool: + - g_typed_view_set_int: + - g_typed_view_set_float: + - g_typed_view_set_double: + - g_typed_view_set_enum: + - g_typed_view_set_date: + - g_typed_view_set_string: + - g_typed_view_set_binary: + - g_typed_view_set_mixed: + NAMES : set_* + SUMMARY : Set value. + DESCR : This method sets the value of a cell. + SIGNATURE: | + void set_bool(size_t row_ndx, bool value); + void set_int(size_t row_ndx, int64_t value); + void set_float(size_t row_ndx, float value); + void set_double(size_t row_ndx, double value); + void set_enum(size_t row_ndx, EnumType value); + void set_date(size_t row_ndx, time_t value); + void set_string(size_t row_ndx, const char* value); + void set_binary(size_t row_ndx, const char* value, size_t len); + void set_mixed(size_t row_ndx, Mixed value); + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*, Mixed] + DESCR : The value. + - NAME : len + TYPES : size_t + DESCR : Size in bytes of binary value. + EXAMPLES: + - CODE : ex_cpp_typed_view_set_xxx + DESCR : +- Sub-tables: + METHODS: + - g_typed_view_get_subtable_size: + NAMES : get_subtable_size + SUMMARY : Get size of subtable. + DESCR : This method gets the size (number of rows) of a subtable. + CONST : true + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + RETURN: + TYPES : size_t + DESCR : Number of rows. + EXAMPLES: + - CODE : ex_cpp_typed_view_get_subtable + DESCR : + - g_typed_view_clear_subtable: + NAMES : clear_subtable + SUMMARY : Remove rows in subtable. + DESCR : This method removes all rows in a subtable. + PARAMS: + - NAME : row_ndx + TYPES : size_t + DESCR : The row index. + EXAMPLES: + - CODE : ex_cpp_typed_view_clear_subtable + DESCR : +- Searching: + METHODS: + - g_typed_view_find_first_bool: + - g_typed_view_find_first_int: + - g_typed_view_find_first_float: + - g_typed_view_find_first_double: + - g_typed_view_find_first_date: + - g_typed_view_find_first_string: + NAMES : find_first_* + SUMMARY : Find first match row. + DESCR : This method finds the first matching row. + SIGNATURE: | + size_t find_first_int(int64_t value) const; + size_t find_first_float(float value) const; + size_t find_first_double(double value) const; + size_t find_first_bool(bool value) const; + size_t find_first_date(time_t value) const; + size_t find_first_string(const char* value) const; + CONST : True + PARAMS: + - NAME : value + TYPES : [bool, int64_t, time_t, const char*] + DESCR : The value. + RETURN: + TYPES : size_t + DESCR : "The row index or tightdb::not_found (equal to std::size_t(-1)) if there is no match." + EXAMPLES: + - CODE : ex_cpp_dyn_view_find_first_xxx + DESCR : + - g_typed_view_find_all_bool: + - g_typed_view_find_all_int: + - g_typed_view_find_all_date: + - g_typed_view_find_all_float: + - g_typed_view_find_all_double: + - g_typed_view_find_all_string: + - g_typed_view_find_all_bool_const: + - g_typed_view_find_all_int_const: + - g_typed_view_find_all_float_const: + - g_typed_view_find_all_double_double: + - g_typed_view_find_all_date_const: + - g_typed_view_find_all_string_const: + NAMES : find_all_* + SUMMARY : Find all matching rows. + DESCR : > + This method finds all matching rows and returns a new {@link class_typed_tableview} object. Beware, + changes to the returning view will propagate back to the source table but changes in the current + view will not propagate forward. + SIGNATURE: | + TableView find_all_int(int64_t value); + TableView find_all_bool(bool value); + TableView find_all_float(float value); + TableView find_all_double(double value); + TableView find_all_date(time_t value); + TableView find_all_string(const char* value); + + ConstTableView find_all_int(int64_t value) const; + ConstTableView find_all_bool(bool value) const; + ConstTableView find_all_float(float value) const; + ConstTableView find_all_double(double value) const; + ConstTableView find_all_date(time_t value) const; + ConstTableView find_all_string(const char* value) const; + PARAMS: + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*] + DESCR : The value. + RETURN: + TYPES : TableView + DESCR : The view. + EXAMPLES: + - CODE : ex_cpp_typed_view_find_all_xxx + DESCR : + - g_typed_view_sort: + NAMES : sort + SUMMARY : &g_typed_view_get_sorted_view_summary + Sort the view. + DESCR : &g_typed_view_get_sorted_view_desc + This method will sort the rows by using values of a given column. + PARAMS: + - NAME : ascending + TYPES : bool + DESCR : "If true, rows are sorted ascending. Default: true." + EXAMPLES: + - CODE : ex_cpp_typed_view_sort + DESCR : +- Aggregates: + METHODS: + - g_typed_view_sum: + - g_typed_view_sum_float: + - g_typed_view_sum_double: + NAMES : [sum, sum_float, sum_double] + SUMMARY : &g_typed_view_sum_summary + Calculates the sum. + DESCR : &g_typed_view_sum_descr + Calculates the sum of a column. + CONST : True + SIGNATURE: | + int64_t sum() const; + double sum_float() const; + double sum_double() const; + RETURN: + TYPES : [int64_t, float, double] + DESCR : The sum. + EXAMPLES: + - CODE : ex_cpp_typed_view_sum + DESCR : + - g_typed_view_maximum: + - g_typed_view_maximum_float: + - g_typed_view_maximum_double: + NAMES : [maximum, maximum_float, maximum_double] + SUMMARY : &g_typed_view_maximum_summary + Find highest value. + DESCR : &g_typed_view_maximum_descr + Find the highest value. + CONST : True + SIGNATURE: | + int64_t maximum(size_t column_ndx) const; + float maximum_float() const; + double maximum_double() const; + RETURN: + TYPES : [int64_t, float, double] + DESCR : The maximum value. + EXAMPLES: + - CODE : ex_cpp_typed_view_maximum + DESCR : + - g_typed_view_minimum: + - g_typed_view_minimum_float: + - g_typed_view_minimum_double: + NAMES : [minimum, minimum_float, minimum_double] + SUMMARY : &g_typed_view_minimum_summary + Find lowest value. + DESCR : &g_typed_view_minimum_descr + Find the lowest value. + CONST : True + SIGNATURE: | + int64_t minimum() const; + float minimum_float() const; + double minimum_double() const; + RETURN: + TYPES : [int64_t, float, double] + DESCR : The minimum value. + EXAMPLES: + - CODE : ex_cpp_typed_view_minimum + DESCR : + - g_typed_view_average: + - g_typed_view_average_float: + - g_typed_view_average_double: + NAMES : [average, average_float, average_double] + SUMMARY : &g_typed_view_average_summary + Find lowest value. + DESCR : &g_typed_view_average_descr + Find the lowest value. + CONST : True + SIGNATURE: | + double average() const; + double average_float() const; + double average_double() const; + RETURN: + TYPES : [int64_t, float, double] + DESCR : The average value. + EXAMPLES: + - CODE : ex_cpp_typed_view_average + DESCR : +- Dump: + METHODS: + - g_typed_view_to_json: + NAMES : to_json + SUMMARY : &g_typed_view_to_json_summary + Convert view to JSON. + DESCR : &g_typed_view_to_json_descr + The JavaScript Object Notation (JSON) is useful for + web/mobile applications and serialization. This + method will convert a view and its columns and rows + to a JSON compatible representation. + PARAMS: + - NAME : out + TYPES : std::ostream& + DESCR : Output stream. + EXAMPLES: + - CODE : ex_cpp_typed_view_to_json + DESCR : + - g_typed_view_to_string: + NAMES : to_string + SUMMARY : &g_typed_view_to_string_summary + Convert view to a string. + DESCR : &g_typed_view_to_string_descr + This method will convert a view and its columns and rows to a format + which is easily read by humans. + CONST : true + PARAMS: + - NAME : out + TYPES : std::ostream& + DESCR : Output stream. + - NAME : limit + TYPES : size_t + DESCR : "The number of rows to convert. Default: 500." + EXAMPLES: + - CODE : ex_cpp_typed_view_to_string + DESCR : From b74b9cc5e612f1f40dfcb0f64309f621a6c9ed73 Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Mon, 25 Mar 2013 16:53:19 +0100 Subject: [PATCH 2/9] doc/ref --- doc/ref/data/group_ref.yaml | 6 +- doc/ref/data/typed_table_ref.yaml | 118 +++++++++++++++++++++++++++++- 2 files changed, 119 insertions(+), 5 deletions(-) diff --git a/doc/ref/data/group_ref.yaml b/doc/ref/data/group_ref.yaml index 6405ef9c85..e4bcfeeba9 100755 --- a/doc/ref/data/group_ref.yaml +++ b/doc/ref/data/group_ref.yaml @@ -55,7 +55,7 @@ CATEGORIES: - Table: METHODS: - g_group_has_table: - NAMES : has_table + NAMES : hasTable SUMMARY : *g_group_has_table_summary DESCR : *g_group_has_table_descr SIGNATURE: (BOOL)hasTable:(NSString *)name withClass:(Class)obj; @@ -73,7 +73,7 @@ CATEGORIES: - DESCR : CODE : ex_cpp_group_optional_table - g_group_get_table: - NAMES : get_table + NAMES : getTable SUMMARY : *g_group_get_table_summary DESCR : *g_group_get_table_descr SIGNATURE: | @@ -114,7 +114,7 @@ CATEGORIES: - DESCR : CODE : ex_cpp_group_write_to_file - g_group_write_to_mem: - NAMES : write_to_mem + NAMES : writeToMem SUMMARY : *g_group_write_to_mem_summary DESCR : *g_group_write_to_mem_descr SIGNATURE: | diff --git a/doc/ref/data/typed_table_ref.yaml b/doc/ref/data/typed_table_ref.yaml index 8d6acb8af6..8d37ccf230 100755 --- a/doc/ref/data/typed_table_ref.yaml +++ b/doc/ref/data/typed_table_ref.yaml @@ -1,6 +1,10 @@ # # Obj-C reference documentation for TypedTable class # + +#UNIMPLEMENTED columns(), front(), back(), insert_empty_row(), lookup() +#INCONSISTENCY add.., addRow, vs. add_empty_row, and number of rows cannot be specified +#INCONSISTENCY popBack() ID : class_typed_table TITLE : Table (typed) @@ -61,13 +65,123 @@ CATEGORIES: - State: METHODS: - g_typed_table_is_empty: - NAMES : is_empty + NAMES : isEmpty DESCR : *g_typed_table_is_empty_descr - SUMMARY : *g_typed_table_is_empty_summary + SUMMARY : *g_typed_table_is_empty_summary + SIGNATURE: | + (BOOL)isEmpty; CONST : true RETURN: TYPES : bool DESCR : *g_typed_table_true_false EXAMPLES: - CODE : ex_cpp_type_table_is_empty + DESCR : + - g_typed_table_size: + NAMES : count + DESCR : *g_typed_table_size_descr + SUMMARY : *g_typed_table_size_summary + SIGNATURE: | + (size_t)count + RETURN: + TYPES : size_t + DESCR : Number of rows in table. + EXAMPLES: + - CODE : ex_cpp_type_table_size + DESCR : +- Table: + METHODS: + - g_typed_table_clear: + NAMES : clear + SUMMARY : *g_typed_table_clear_summary + DESCR : *g_typed_table_clear_descr + SIGNATURE: | + (void)clear; + EXAMPLES: + - CODE : ex_cpp_typed_table_clear + DESCR : + - g_typed_table_optimize: + NAMES : optimize + SUMMARY : *g_typed_table_optimize_summary + DESCR : *g_typed_table_optimize_descr + SIGNATURE: | + (void)optimize + - g_dyn_table_opertator==: + NAMES : isEqual + SUMMARY : *g_typed_table_operator_eq_summary + DESCR : *g_typed_table_operator_eq_descr + SIGNATURE: | + (BOOL)isEqual:(TightdbTable *)other + PARAMS: + - NAME : other + TYPES : TightdbTable + DESCR : The other table. + RETURN: + TYPES : bool + DESCR : true if the two tables are equal, false otherwise. + EXAMPLES: + - CODE : ex_cpp_dyn_table_operator== + DESCR : +- Rows: + METHODS: + - g_typed_table_add: + NAMES : add* + SIGNATURE: | + RowAccesor add(value, ...) + SUMMARY : Add new row. + DESCR : This method adds a new row to a typed table.

The method is made available by a macro based on the table definition {@link g_typed_table_macros}. Note that the method name includes specific column names defined in the table definition. E.g. "CName1" will be replaced by the name of the first column in your table and so forth. Please refer to the example below. + SIGNATURE: | + (void)addCName1:value1 CName2:value2 CName3:value3 + PARAMS: + - NAME : "value1, value2, value3, …" + TYPES : various + DESCR : Values for all columns in the row. + EXAMPLES: + - CODE : ex_cpp_typed_table_add + DESCR : + - g_typed_table_add_empty_row: + NAMES : addRow + SUMMARY : This method will add one or more empty rows at the end of the table. + DESCR : Add an empty row. + SIGNATURE: | + (size_t)addRow + EXAMPLES: + - CODE : ex_cpp_typed_table_add_empty_row + DESCR : + - g_typed_table_insert: + NAMES : insert* + SIGNATURE: | + (void)insertAtIndex:(size_t)ndx CName1:value1 CName2:value2 CName3:value3 + SUMMARY : Insert a new row at a specified position. + DESCR : This method adds a new row to a typed table at a specified position.

The method is made available by a macro based on the table definition {@link g_typed_table_macros}. Note that the method name includes specific column names defined in the table definition. E.g. "CName1" will be replaced by the name of the first column in your table and so forth. Please refer to the example below. + PARAMS: + - NAME : ndx + TYPES : size_t + DESCR : Insert position. + - NAME : "value1, value2, value3, …" + TYPES : various + DESCR : Values for all columns in the row. + EXAMPLES: + - CODE : ex_cpp_typed_table_insert DESCR : + - g_typed_table_remove_row: + NAMES : remove + SUMMARY : *g_typed_table_remove_row_summary + DESCR : *g_typed_table_remove_row_descr + SIGNATURE: (void)delete:(size_t)ndx + PARAMS: + - NAME : ndx + TYPES : size_t + DESCR : Position of row to delete. + EXAMPLES: + - CODE : ex_cpp_typed_table_remove + DESCR : + - g_typed_table_remove_last_row: + NAMES : popBack + SUMMARY : *g_typed_table_remove_last_row_summary + DESCR : *g_typed_table_remove_last_row_descr + SIGNATURE: (void)popBack + EXAMPLES: + - CODE : ex_cpp_typed_table_remove_last_row + DESCR : + From 5cd38530bd94a9272e63da987cf5bffc124f4463 Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Tue, 26 Mar 2013 17:34:43 +0100 Subject: [PATCH 3/9] updates in docs/ref/data --- doc/ref/data/reference.yaml | 8 +- doc/ref/data/typed_query_ref.yaml | 565 +++++------------------------- doc/ref/data/typed_table_ref.yaml | 35 +- 3 files changed, 119 insertions(+), 489 deletions(-) diff --git a/doc/ref/data/reference.yaml b/doc/ref/data/reference.yaml index 9ecd3a379b..55ea2ca861 100644 --- a/doc/ref/data/reference.yaml +++ b/doc/ref/data/reference.yaml @@ -40,7 +40,7 @@ DESCR : > and environments. For multi-threaded or multi-process applications, you can use the {@link class_shared_group}. -IMPORT : [reference, typed_table_ref, dyn_table_ref, dyn_query_ref, group_ref, typed_view_ref, dyn_view_ref, shared_group_ref] +IMPORT : [reference, typed_table_ref, dyn_table_ref, dyn_query_ref, group_ref, typed_view_ref, dyn_view_ref, shared_group_ref, typed_query_ref] IMPORTPATH: ../../tightdb/doc/ref_cpp/data @@ -48,15 +48,15 @@ CATEGORIES: # list global class-id in order of appearence - Typed Table: # Category header name - typed_table # Global Class name. File: 'typed_table_ref.yaml' # - typed_view -# - typed_query -- Dynamic Table: + - typed_query +#- Dynamic Table: # - dyn_table # - dyn_view # - dyn_query - Collection: - group # - shared_group -- Helpers: +#- Helpers: # - mixed # - cursor diff --git a/doc/ref/data/typed_query_ref.yaml b/doc/ref/data/typed_query_ref.yaml index e11376ddac..c0fcf88f15 100755 --- a/doc/ref/data/typed_query_ref.yaml +++ b/doc/ref/data/typed_query_ref.yaml @@ -1,39 +1,24 @@ # -# C++ reference documentation for Query class +# Obj-C reference documentation for Query class # + +# NOTIMPLEMENTED binary data type missing +# INCONSISTENCY greater vs greaterThan ID : class_typed_query TITLE : Query (typed) -SUMMARY : &g_typed_query_intro_summary - Query your TightDB table. -DESCR : &g_typed_query_intro_descr - > - Query objects are used to build up queries. A query is tied to a - {@link class_typed_table}. The typed query class is used in conjunction with - {@link class_typed_table}. - - Conditions is added to a query through a - fluent interface. - This means that the methods representing the conditions will return the - query object. - - Conditions are split in two parts: the column name and a method for each - predicate. Conditions are folded with logical-and if not stated otherwise. - - Once the query is ready, it is possible to reuse by multiple calls to - the action methods. - Moreover, it is possible extend the query with new conditions after applying an - action method and thereby implement a drill-down. It is important to stress that - no data is cached, and the new queries cannot benefit from previous queries. - - Alternatively, a query can result in a {@link class_typed_tableview} which can be further - queried. +SUMMARY : *g_typed_query_intro_summary +DESCR : *g_typed_query_intro_descr SEE : EXAMPLES : - DESCR: CODE: ex_cpp_typed_query_intro IGNORE : [] -CATEGORIES : +CATEGORIES : + + + + - Conditions: METHODS: - g_typed_query_equals_boolean: @@ -45,37 +30,28 @@ CATEGORIES : - g_typed_query_equals_binary: NAMES : [ equal, equal_date, equal_binary ] SIGNATURE: | - Query& equal(bool value); - Query& equal(int64_t value); - Query& equal(float value); - Query& equal(double value); - Query& equal(const char* value, bool case_sensitive=true); - Query& equal_date(time_t value); - Query& equal_binary(const char* data, size_t size); - SUMMARY : &g_typed_query_equals_summary - Equal to. - DESCR : &g_typed_query_equals_descr - Queries for column values equals to a certain value. + (TightdbQuery *)equal:(BOOL)value + (TightdbQuery *)equal:(int64_t)value + (TightdbQuery *)equal:(float)value + (TightdbQuery *)equal:(double)value + (TightdbQuery *)equal:(NSString *)value + (TightdbQuery *)equal:(NSString *)value caseSensitive:(BOOL)caseSensitive + (TightdbQuery *)equal:(time_t)value + SUMMARY : *g_typed_query_equals_summary + DESCR : *g_typed_query_equals_descr PARAMS: - NAME : value TYPES : [bool, int64_t, float, double, const char*, time_t] - DESCR : The value. - - NAME : case_sensitive - TYPES : bool - DESCR : &g_typed_query_case_sensitive_descr - 'String match can be performed case sensitive or not. Default: true.' - - NAME : data - TYPES : const char* - DESCR : Pointer to a chunk of binary data. - - NAME : size - TYPES : size_t - DESCR : Size of binary data chunk. + DESCR : The value. + - NAME : caseSensitive + TYPES : BOOL + DESCR : 'String match can be performed case sensitive or not. Default: true.' RETURN: TYPES : Query& DESCR : The query object. EXAMPLES: - DESCR : - CODE : ex_cpp_typed_query_equals + CODE : ex_cpp_typed_query_equals - g_typed_query_notEquals_boolean: - g_typed_query_notEquals_integer: - g_typed_query_notEquals_float: @@ -83,19 +59,16 @@ CATEGORIES : - g_typed_query_notEquals_string: - g_typed_query_notEquals_date: - g_typed_query_notEquals_binary: - NAMES : [ not_equal, not_equal, not_equal_binary ] + NAMES : [ notEqual, not_equal, not_equal_binary ] SIGNATURE: | - Query& not_equal(bool value); - Query& not_equal(int64_t value); - Query& not_equal(float value); - Query& not_equal(double value); - Query& not_equal(const char* value, bool case_sensitive=true); - Query& not_equal_date(time_t value); - Query& not_equal_binary(const char* data, size_t size); - SUMMARY : &g_typed_query_notEquals_summary - Not equal to. - DESCR : &g_typed_query_notEquals_descr - Queries for column values not equals to a certain value. + (TightdbQuery *)notEqual:(int64_t)value + (TightdbQuery *)notEqual:(float)value + (TightdbQuery *)notEqual:(double)value + (TightdbQuery *)notEqual:(NSString *)value + (TightdbQuery *)notEqual:(NSString *)value caseSensitive:(BOOL)caseSensitive + (TightdbQuery *)notEqual:(time_t)value + SUMMARY : *g_typed_query_notEquals_summary + DESCR : *g_typed_query_notEquals_descr PARAMS: - NAME : value TYPES : [bool, int64_t, float, double, const char*, time_t] @@ -103,12 +76,6 @@ CATEGORIES : - NAME : case_sensitive TYPES : bool DESCR : 'String match can be performed case sensitive or not. Default: true.' - - NAME : data - TYPES : const char* - DESCR : Pointer to a chunk of binary data. - - NAME : size - TYPES : size_t - DESCR : Size of binary data chunk. RETURN: TYPES : Query& DESCR : The query object. @@ -121,14 +88,12 @@ CATEGORIES : - g_typed_query_greaterThan_date: NAMES : [ greater, greater, greater, greater_date ] SIGNATURE: | - Query& greater(int64_t value); - Query& greater(float value); - Query& greater(double value); - Query& greater_date(time_t value); - SUMMARY : &g_typed_query_greaterThan_summary - Greater than. - DESCR : &g_typed_query_greaterThan_descr - Queries for column values greater than a certain value. + (TightdbQuery *)greater:(int64_t)value + (TightdbQuery *)greater:(float)value + (TightdbQuery *)greater:(double)value + (TightdbQuery *)greater:(time_t)value + SUMMARY : *g_typed_query_greaterThan_summary + DESCR : *g_typed_query_greaterThan_descr PARAMS: - NAME : value TYPES : [int64_t, float, double, time_t] @@ -143,14 +108,12 @@ CATEGORIES : - g_typed_query_greaterThanOrEqual_date: NAMES : [ greater_equal, greater_equal_date ] SIGNATURE: | - Query& greater_equal(int64_t value); - Query& greater_equal(float value); - Query& greater_equal(double value); - Query& greater_equal_date(time_t value); - SUMMARY : &g_typed_query_greaterThanOrEqual_summary - Greater than or equal to. - DESCR : &g_typed_query_greaterThanOrEqual_descr - Queries for column values greater than or equal to a specified value. + (TightdbQuery *)greaterEqual:(int64_t)value + (TightdbQuery *)greaterEqual:(float)value + (TightdbQuery *)greaterEqual:(double)value + (TightdbQuery *)greaterEqual:(time_t)value + SUMMARY : *g_typed_query_greaterThanOrEqual_summary + DESCR : *g_typed_query_greaterThanOrEqual_descr PARAMS: - NAME : value TYPES : [int64_t, float, double, time_t] @@ -160,19 +123,22 @@ CATEGORIES : DESCR : The query object. EXAMPLES: - DESCR : - CODE : ex_cpp_typed_query_greaterThanOrEqual + CODE : ex_cpp_typed_query_greaterThanOrEqual + + +# OK UNTIL HERE + + - g_typed_query_lessThan: - g_typed_query_lessThan_date: NAMES : [less, less_date] SIGNATURE: | - Query& less(int64_t value); - Query& less(float value); - Query& less(double value); - Query& less_date(time_t value); - SUMMARY : &g_typed_query_lessThan_summary - Less than. - DESCR : &g_typed_query_lessThan_descr - Queries for column values less than a specified value. + (TightdbQuery *)less:(int64_t)value + (TightdbQuery *)less:(float)value + (TightdbQuery *)less:(double)value + (TightdbQuery *)less:(time_t)value + SUMMARY : *g_typed_query_lessThan_summary + DESCR : *g_typed_query_lessThan_descr PARAMS: - NAME : value TYPES : [int64_t, float, double, time_t] @@ -185,16 +151,14 @@ CATEGORIES : CODE : ex_cpp_typed_query_lessThan - g_typed_query_lessThanOrEqual: - g_typed_query_lessThanOrEqual_date: - NAMES : [less_equal, less_equal_date] + NAMES : [lessEqual, less_equal_date] SIGNATURE: | - Query& less_equal(int64_t value); - Query& less_equal(float value); - Query& less_equal(double value); - Query& less_equal_date(time_t value); - SUMMARY : &g_typed_query_lessThanOrEqual_summary - Less than or equal to. - DESCR : &g_typed_query_lessThanOrEqual_descr - Queries for column values less than or equal to a certain value. + (TightdbQuery *)lessEqual:(int64_t)value + (TightdbQuery *)lessEqual:(float)value + (TightdbQuery *)lessEqual:(double)value + (TightdbQuery *)lessEqual:(time_t)value + SUMMARY : *g_typed_query_lessThanOrEqual_summary + DESCR : *g_typed_query_lessThanOrEqual_descr PARAMS: - NAME : value TYPES : [int64_t, float, double, time_t] @@ -209,14 +173,12 @@ CATEGORIES : - g_typed_query_between_date: NAMES : [between, between_date] SIGNATURE: | - Query& between(int64_t from, int64_t to); - Query& between(float from, float to); - Query& between(double from, double to); - Query& between_date(time_t from, time_t to); - DESCR : &g_typed_query_between_descr - Queries for column values in ranges. - SUMMARY : &g_typed_query_between_summary - Belongs to an interval. + (TightdbQuery *)between:(int64_t)from to:(int64_t)to + (TightdbQuery *)between:(float)from to:(float)to + (TightdbQuery *)between:(double)from to:(double)to + (TightdbQuery *)between:(time_t)from to:(time_t)to + DESCR : *g_typed_query_between_descr + SUMMARY : *g_typed_query_between_summary PARAMS: - NAME : from TYPES : [int64_t, float, double, time_t] @@ -232,14 +194,12 @@ CATEGORIES : CODE : ex_cpp_typed_query_between - g_typed_query_startsWith: - g_typed_query_startsWith_binary: - NAMES : [begins_with, begins_with_binary] + NAMES : [beginsWith, begins_with_binary] SIGNATURE: | - Query& begins_with(const char* value, bool case_sensitive=true); - Query& begins_with_binary(const char* data, size_t size); - DESCR : &g_typed_query_startsWith_descr - Queries for column values which begin with a certain prefix. - SUMMARY : &g_typed_query_startsWith_summary - Substring match at the begining of the attribute. + (TightdbQuery *)beginsWith:(NSString *)value + (TightdbQuery *)beginsWith:(NSString *)value caseSensitive:(BOOL) + DESCR : *g_typed_query_startsWith_descr + SUMMARY : *g_typed_query_startsWith_summary PARAMS: - NAME : value TYPES : const char* @@ -247,12 +207,6 @@ CATEGORIES : - NAME : case_sensitive TYPES : bool DESCR : *g_typed_query_case_sensitive_descr - - NAME : data - TYPES : const char* - DESCR : Pointer to a chunk of binary data. - - NAME : size - TYPES : size_t - DESCR : Size of binary data chunk. RETURN: TYPES : Query& DESCR : The query object. @@ -261,14 +215,12 @@ CATEGORIES : CODE : ex_cpp_typed_query_startsWith - g_typed_query_endsWith: - g_typed_query_endsWith_binary: - NAMES : [ends_with, ends_with_binary] + NAMES : [endsWith, ends_with_binary] SIGNATURE: | - Query& ends_with(const char* value, bool case_sensitive=true); - Query& ends_with_binary(const char* data, size_t size); - DESCR : &g_typed_query_endsWith_descr - Queries for column values which end with a certain suffix. - SUMMARY : &g_typed_query_endsWith_summary - Substring match at the end at the attribute. + (TightdbQuery *)endsWith:(NSString *)value + (TightdbQuery *)endsWith:(NSString *)value caseSensitive:(BOOL)caseSensitive + DESCR : *g_typed_query_endsWith_descr + SUMMARY : *g_typed_query_endsWith_summary PARAMS: - NAME : value TYPES : const char* @@ -276,12 +228,6 @@ CATEGORIES : - NAME : case_sensitive TYPES : bool DESCR : *g_typed_query_case_sensitive_descr - - NAME : data - TYPES : const char* - DESCR : Pointer to a chunk of binary data. - - NAME : size - TYPES : size_t - DESCR : Size of binary data chunk. RETURN: TYPES : Query& DESCR : The query object. @@ -292,12 +238,10 @@ CATEGORIES : - g_typed_query_contains_binary: NAMES : [contains, contains_binary] SIGNATURE: | - Query& contains(const char* value, bool case_sensitive=true); - Query& contains_binary(const char* data, size_t size); - DESCR : &g_typed_query_contains_descr - Queries for column values which contain a certian substring. - SUMMARY : &g_typed_query_contains_summary - Substring search. + (TightdbQuery *)contains:(NSString *)value + (TightdbQuery *)contains:(NSString *)value caseSensitive:(BOOL)caseSensitive + DESCR : *g_typed_query_contains_descr + SUMMARY : *g_typed_query_contains_summary PARAMS: - NAME : value TYPES : const char* @@ -305,346 +249,9 @@ CATEGORIES : - NAME : case_sensitive TYPES : bool DESCR : *g_typed_query_case_sensitive_descr - - NAME : data - TYPES : const char* - DESCR : Pointer to a chunk of binary data. - - NAME : size - TYPES : size_t - DESCR : Size of binary data chunk. RETURN: TYPES : Query& DESCR : The query object. EXAMPLES: - DESCR : - CODE : ex_cpp_typed_query_contains -- Combiners: - METHODS: - - g_typed_query_group: - NAMES : group - DESCR : &g_typed_query_group_descr - > - Group conditions ("left" parenthesis). Group of conditions can be nested and they are - conceptually a parenthesis. - SUMMARY : &g_typed_query_group_summary - Start group ("left parenthesis"). - RETURN: - TYPES : Query - DESCR : The query object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_group - - g_typed_query_endGroup: - NAMES : end_group - DESCR : &g_typed_query_endGroup_descr - Group conditions ("right" parenthesis). - SUMMARY : &g_typed_query_endGroup_summary - Stop group ("right parenthesis"). - RETURN: - TYPES : Query - DESCR : The query object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_group - - g_typed_query_or: - NAMES : Or - DESCR : &g_typed_query_or_descr - Two conditions will be folded by logical-or. - SUMMARY : &g_typed_query_or_summary - Logical-or. - RETURN: - TYPES : Query - DESCR : The query object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_or - - g_typed_query_subtable: - NAMES : subtable - DESCR : &g_typed_query_subtable_descr - Query a subtable. - SUMMARY : &g_typed_query_subtable_summary - Query a subtable. - RETURN: - TYPES : Query - DESCR : The query object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_subtable - - g_typed_query_endSubtable: - NAMES : end_subtable - DESCR : &g_typed_query_endSubtable_descr - End of subtable query. - SUMMARY : &g_typed_query_endSubtable_summary - End of subtable query. - RETURN: - TYPES : Query - DESCR : The query object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_subtable -- Actions: - METHODS: - - g_typed_query_find_all_const: - - g_typed_query_find_all: - NAMES : find_all - DESCR : &g_typed_query_find_all_descr - Execute a query. See the {@link class_dyn_tableview} class for further details. - SUMMARY : &g_typed_query_find_all_summary - Execute query. - SIGNATURE: | - TableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); - ConstTableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); - PARAMS: - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : [TableView, ConstTableView] - DESCR : The TableView object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_findall - - g_typed_query_find_next: - NAMES : find_next - DESCR : &g_typed_query_find_next_descr - Find next row. - SUMMARY : &g_typed_query_find_next_summary - Find next row. - PARAMS: - - NAME : lastmatch - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - RETURN: - TYPES : size_t - DESCR : Row number - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_find_next - - g_typed_query_sum: - - g_typed_query_sum_float: - - g_typed_query_sum_double: - NAMES : [sum, sum_float, sum_double] - DESCR : &g_typed_query_sum_descr - This method calculates the sum. - SUMMARY : &g_typed_query_sum_summary - Calculate sum. - CONST : true - SIGNATURE: | - int64_t sum(size_t column_ndx, size_t* resultcount, size_t start, size_t end, size_t limit) const; - double sum_float(size_t column_ndx, size_t* resultcount, size_t start, size_t end, size_t limit) const; - double sum_double(size_t column_ndx, size_t* resultcount, size_t start, size_t end, size_t limit) const; - PARAMS: - - NAME : resultcount - DESCR : The number of rows used to calculate the sum. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : [int64_t, float, double] - DESCR : The sum. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_sum - - g_typed_query_size: - NAMES : count - DESCR : &g_typed_query_size_descr - Find the number of matching rows. - SUMMARY : &g_typed_query_size_summary - Number of matching rows. - CONST : true - PARAMS: - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : size_t - DESCR : The number of rows. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_size - - g_typed_query_maximum_date: - - g_typed_query_maximum: - - g_typed_query_maximum_float: - - g_typed_query_maximum_double: - NAMES : [maximum, maximum_float, maximum_double] - DESCR : &g_typed_query_maximum_descr - This method finds the highest value. - SUMMARY : &g_typed_query_maximum_summary - Highest value. - CONST : true - SIGNATURE: | - int64_t maximum(size_t* resultcount, size_t start, size_t end, size_t limit) const; - float maximum_float(size_t* resultcount, size_t start, size_t end, size_t limit) const; - double maximum_double(size_t* resultcount, size_t start, size_t end, size_t limit) const; - PARAMS: - - NAME : resultcount - DESCR : The number of rows used to find the highest value. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : [int64_t, float, double] - DESCR : The highest value. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_maximum - - g_typed_query_minimum: - - g_typed_query_minimum_float: - - g_typed_query_minimum_double: - NAMES : minimum - DESCR : &g_typed_query_minimum_descr - This method finds the lowest value. - SUMMARY : &g_typed_query_minimum_summary - Lowest value. - CONST : true - SIGNATURE: | - int64_t minimum(size_t* resultcount, size_t start, size_t end, size_t limit) const; - float minimum_float(size_t* resultcount, size_t start, size_t end, size_t limit) const; - double minimum_double(size_t* resultcount, size_t start, size_t end, size_t limit) const; - PARAMS: - - NAME : resultcount - DESCR : The number of rows used to find the value. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : [int64_t, float, double] - DESCR : The lowest value. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_manimum - - g_typed_query_average: - - g_typed_query_average_float: - - g_typed_query_average_double: - NAMES : average - SUMMARY : &g_typed_query_average_summary - Calcualtes the average. - DESCR : &g_typed_query_average_descr - This method calcualtes the average. - CONST : true - SIGNATURE: | - double average(size_t* resultcount, size_t start, size_t end, size_t limit) const; - double average_float(size_t* resultcount, size_t start, size_t end, size_t limit) const; - double average_double(size_t* resultcount, size_t start, size_t end, size_t limit) const; - PARAMS: - - NAME : resultcount - DESCR : The number of rows used to calculate the average. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : double - DESCR : The average. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_average - - g_typed_query_remove: - NAMES : remove - DESCR : &g_typed_query_remove_descr - This method will remove all matching rows in the source table. - SUMMARY : &g_typed_query_remove_summary - Remove rows. - CONST : true - PARAMS: - - NAME : resultcount - DESCR : The number of rows used to calculate the average. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : size_t - DESCR : The number of rows removed. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_remove -- Multithreaded: - METHODS: - - g_typed_query_find_all_multi: - - g_typed_query_find_all_const_multi: - NAMES : find_all_multi - DESCR : &g_typed_query_find_all_multi_descr - Execute a query using (POSIX) threads. See the {@link class_dyn_tableview} class for further details. - SUMMARY : &g_typed_query_find_all_multi_summary - Execute query. - SIGNATURE: | - TableView find_all_multi(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); - ConstTableView find_all_multi(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); - - PARAMS: - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : [TableView, ConstTableView] - DESCR : The TableView object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_find_all_multi - - g_typed_query_set_threads: - NAMES : set_threads - SUMMARY : &g_typed_query_set_threads_summary - Set the number of threads. - DESCR : &g_typed_query_set_threads_descr - Set the number of threads. - PARAMS: - - NAME : threadcount - TYPES : unsigned int - DESCR : Number of threads. - RETURN: - DESCR : Success or not - TYPES : int - EXAMPLES: - - DESCR : - CODE : ex_cpp_typed_query_find_all_multi + CODE : ex_cpp_typed_query_contains \ No newline at end of file diff --git a/doc/ref/data/typed_table_ref.yaml b/doc/ref/data/typed_table_ref.yaml index 8d37ccf230..08cac9f847 100755 --- a/doc/ref/data/typed_table_ref.yaml +++ b/doc/ref/data/typed_table_ref.yaml @@ -2,9 +2,9 @@ # Obj-C reference documentation for TypedTable class # -#UNIMPLEMENTED columns(), front(), back(), insert_empty_row(), lookup() +#UNIMPLEMENTED columns(), front(), back(), insert_empty_row(), lookup(), findAll() via table Propery, get_sorted_view(), where(), distinct() #INCONSISTENCY add.., addRow, vs. add_empty_row, and number of rows cannot be specified -#INCONSISTENCY popBack() +#INCONSISTENCY popBack(), find_first_* ->> find* ("first" is omitted) ID : class_typed_table TITLE : Table (typed) @@ -131,7 +131,7 @@ CATEGORIES: SUMMARY : Add new row. DESCR : This method adds a new row to a typed table.

The method is made available by a macro based on the table definition {@link g_typed_table_macros}. Note that the method name includes specific column names defined in the table definition. E.g. "CName1" will be replaced by the name of the first column in your table and so forth. Please refer to the example below. SIGNATURE: | - (void)addCName1:value1 CName2:value2 CName3:value3 + (void)addCName1:(CType1*)value1 CName2:(CType2*)value2 CName3:(CType3*)value3 PARAMS: - NAME : "value1, value2, value3, …" TYPES : various @@ -151,9 +151,9 @@ CATEGORIES: - g_typed_table_insert: NAMES : insert* SIGNATURE: | - (void)insertAtIndex:(size_t)ndx CName1:value1 CName2:value2 CName3:value3 + (void)insertAtIndex:(size_t)ndx CName1:(CType1*)value1 CName2:(CType2*)value2 CName3:(CType3*)value3 SUMMARY : Insert a new row at a specified position. - DESCR : This method adds a new row to a typed table at a specified position.

The method is made available by a macro based on the table definition {@link g_typed_table_macros}. Note that the method name includes specific column names defined in the table definition. E.g. "CName1" will be replaced by the name of the first column in your table and so forth. Please refer to the example below. + DESCR : This method adds a new row to a typed table at a specified position.

This method is automatically made available by a macro taking as input the table definition {@link g_typed_table_macros}. Note that the method name includes specific column names defined in the table definition. E.g. "CName1" will be replaced by the name of the first column in your table and so forth. Please refer to the example below. PARAMS: - NAME : ndx TYPES : size_t @@ -183,5 +183,28 @@ CATEGORIES: SIGNATURE: (void)popBack EXAMPLES: - CODE : ex_cpp_typed_table_remove_last_row + DESCR : +- Searching: + METHODS: + - g_find_first_bool: + - g_find_first_int: + - g_find_first_float: + - g_find_first_double: + - g_find_first_date: + - g_find_first_string: + NAMES : find* + SUMMARY : *g_find_first_xxx_summary + DESCR : The method finds the first occurence of a given value in a column.

This method is automatically made available by a macro taking as input the table definition {@link g_typed_table_macros}. The method can only be accessed through a property of the table object. The property CName represents the column to be searched. The type of value must correspond type of the column being accessed. Refer also to the example below. + SIGNATURE: | + .CName (size_t)find: (CType*)value + CONST : True + PARAMS: + - NAME : value + TYPES : [bool, int64_t, float, double, time_t, const char*] + DESCR : The value. + RETURN: + TYPES : size_t + DESCR : "The row index or tightdb::not_found (equal to size_t(-1)) if there is no match." + EXAMPLES: + - CODE : ex_cpp_typed_table_find_first_xxx DESCR : - From db22dcb8ac70f8626dccf8da900be39721f026ca Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Wed, 3 Apr 2013 17:43:32 +0200 Subject: [PATCH 4/9] updates in /doc/ref/data: Group, Table (typed) and Query (typed) first draft ready --- doc/ref/data/typed_query_ref.yaml | 270 ++++++++++++++++++++++++------ doc/ref/data/typed_table_ref.yaml | 6 +- 2 files changed, 218 insertions(+), 58 deletions(-) diff --git a/doc/ref/data/typed_query_ref.yaml b/doc/ref/data/typed_query_ref.yaml index c0fcf88f15..5086bb20a3 100755 --- a/doc/ref/data/typed_query_ref.yaml +++ b/doc/ref/data/typed_query_ref.yaml @@ -2,8 +2,9 @@ # Obj-C reference documentation for Query class # -# NOTIMPLEMENTED binary data type missing +# NOTIMPLEMENTED accessors for Binaray, Subtable # INCONSISTENCY greater vs greaterThan +# UNCLEAR group description, findNext: the parameter name "last" was slightly confusing in same context as "next" as it was really the "stopAt" row. ID : class_typed_query TITLE : Query (typed) @@ -30,13 +31,13 @@ CATEGORIES : - g_typed_query_equals_binary: NAMES : [ equal, equal_date, equal_binary ] SIGNATURE: | - (TightdbQuery *)equal:(BOOL)value - (TightdbQuery *)equal:(int64_t)value - (TightdbQuery *)equal:(float)value - (TightdbQuery *)equal:(double)value - (TightdbQuery *)equal:(NSString *)value - (TightdbQuery *)equal:(NSString *)value caseSensitive:(BOOL)caseSensitive - (TightdbQuery *)equal:(time_t)value + .CName (TableName_Query *)equal:(BOOL)value + .CName (TableName_Query *)equal:(int64_t)value + .CName (TableName_Query *)equal:(float)value + .CName (TableName_Query *)equal:(double)value + .CName (TableName_Query *)equal:(NSString *)value + .CName (TableName_Query *)equal:(NSString *)value caseSensitive:(BOOL)caseSensitive + .CName (TableName_Query *)equal:(time_t)value SUMMARY : *g_typed_query_equals_summary DESCR : *g_typed_query_equals_descr PARAMS: @@ -48,7 +49,7 @@ CATEGORIES : DESCR : 'String match can be performed case sensitive or not. Default: true.' RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_equals @@ -61,12 +62,12 @@ CATEGORIES : - g_typed_query_notEquals_binary: NAMES : [ notEqual, not_equal, not_equal_binary ] SIGNATURE: | - (TightdbQuery *)notEqual:(int64_t)value - (TightdbQuery *)notEqual:(float)value - (TightdbQuery *)notEqual:(double)value - (TightdbQuery *)notEqual:(NSString *)value - (TightdbQuery *)notEqual:(NSString *)value caseSensitive:(BOOL)caseSensitive - (TightdbQuery *)notEqual:(time_t)value + .CName (TableName_Query *)notEqual:(int64_t)value + .CName (TableName_Query *)notEqual:(float)value + .CName (TableName_Query *)notEqual:(double)value + .CName (TableName_Query *)notEqual:(NSString *)value + .CName (TableName_Query *)notEqual:(NSString *)value caseSensitive:(BOOL)caseSensitive + .CName (TableName_Query *)notEqual:(time_t)value SUMMARY : *g_typed_query_notEquals_summary DESCR : *g_typed_query_notEquals_descr PARAMS: @@ -78,7 +79,7 @@ CATEGORIES : DESCR : 'String match can be performed case sensitive or not. Default: true.' RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_notEquals @@ -88,10 +89,10 @@ CATEGORIES : - g_typed_query_greaterThan_date: NAMES : [ greater, greater, greater, greater_date ] SIGNATURE: | - (TightdbQuery *)greater:(int64_t)value - (TightdbQuery *)greater:(float)value - (TightdbQuery *)greater:(double)value - (TightdbQuery *)greater:(time_t)value + .CName (TableName_Query *)greater:(int64_t)value + .CName (TableName_Query *)greater:(float)value + .CName (TableName_Query *)greater:(double)value + .CName (TableName_Query *)greater:(time_t)value SUMMARY : *g_typed_query_greaterThan_summary DESCR : *g_typed_query_greaterThan_descr PARAMS: @@ -100,7 +101,7 @@ CATEGORIES : DESCR : The value. RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_greaterThan @@ -108,10 +109,10 @@ CATEGORIES : - g_typed_query_greaterThanOrEqual_date: NAMES : [ greater_equal, greater_equal_date ] SIGNATURE: | - (TightdbQuery *)greaterEqual:(int64_t)value - (TightdbQuery *)greaterEqual:(float)value - (TightdbQuery *)greaterEqual:(double)value - (TightdbQuery *)greaterEqual:(time_t)value + .CName (TableName_Query *)greaterEqual:(int64_t)value + .CName (TableName_Query *)greaterEqual:(float)value + .CName (TableName_Query *)greaterEqual:(double)value + .CName (TableName_Query *)greaterEqual:(time_t)value SUMMARY : *g_typed_query_greaterThanOrEqual_summary DESCR : *g_typed_query_greaterThanOrEqual_descr PARAMS: @@ -120,23 +121,19 @@ CATEGORIES : DESCR : The value. RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_greaterThanOrEqual - -# OK UNTIL HERE - - - g_typed_query_lessThan: - g_typed_query_lessThan_date: NAMES : [less, less_date] SIGNATURE: | - (TightdbQuery *)less:(int64_t)value - (TightdbQuery *)less:(float)value - (TightdbQuery *)less:(double)value - (TightdbQuery *)less:(time_t)value + .CName (TableName_Query *)less:(int64_t)value + .CName (TableName_Query *)less:(float)value + .CName (TableName_Query *)less:(double)value + .CName (TableName_Query *)less:(time_t)value SUMMARY : *g_typed_query_lessThan_summary DESCR : *g_typed_query_lessThan_descr PARAMS: @@ -145,7 +142,7 @@ CATEGORIES : DESCR : The value. RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_lessThan @@ -153,10 +150,10 @@ CATEGORIES : - g_typed_query_lessThanOrEqual_date: NAMES : [lessEqual, less_equal_date] SIGNATURE: | - (TightdbQuery *)lessEqual:(int64_t)value - (TightdbQuery *)lessEqual:(float)value - (TightdbQuery *)lessEqual:(double)value - (TightdbQuery *)lessEqual:(time_t)value + .CName (TableName_Query *)lessEqual:(int64_t)value + .CName (TableName_Query *)lessEqual:(float)value + .CName (TableName_Query *)lessEqual:(double)value + .CName (TableName_Query *)lessEqual:(time_t)value SUMMARY : *g_typed_query_lessThanOrEqual_summary DESCR : *g_typed_query_lessThanOrEqual_descr PARAMS: @@ -165,7 +162,7 @@ CATEGORIES : DESCR : The value. RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_lessThanOrEqual @@ -173,10 +170,10 @@ CATEGORIES : - g_typed_query_between_date: NAMES : [between, between_date] SIGNATURE: | - (TightdbQuery *)between:(int64_t)from to:(int64_t)to - (TightdbQuery *)between:(float)from to:(float)to - (TightdbQuery *)between:(double)from to:(double)to - (TightdbQuery *)between:(time_t)from to:(time_t)to + .CName (TableName_Query *)between:(int64_t)from to:(int64_t)to + .CName (TableName_Query *)between:(float)from to:(float)to + .CName (TableName_Query *)between:(double)from to:(double)to + .CName (TableName_Query *)between:(time_t)from to:(time_t)to DESCR : *g_typed_query_between_descr SUMMARY : *g_typed_query_between_summary PARAMS: @@ -188,7 +185,7 @@ CATEGORIES : DESCR : Upper bound of range. RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_between @@ -196,8 +193,8 @@ CATEGORIES : - g_typed_query_startsWith_binary: NAMES : [beginsWith, begins_with_binary] SIGNATURE: | - (TightdbQuery *)beginsWith:(NSString *)value - (TightdbQuery *)beginsWith:(NSString *)value caseSensitive:(BOOL) + .CName (TableName_Query *)beginsWith:(NSString *)value + .CName (TableName_Query *)beginsWith:(NSString *)value caseSensitive:(BOOL) DESCR : *g_typed_query_startsWith_descr SUMMARY : *g_typed_query_startsWith_summary PARAMS: @@ -209,7 +206,7 @@ CATEGORIES : DESCR : *g_typed_query_case_sensitive_descr RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_startsWith @@ -217,8 +214,8 @@ CATEGORIES : - g_typed_query_endsWith_binary: NAMES : [endsWith, ends_with_binary] SIGNATURE: | - (TightdbQuery *)endsWith:(NSString *)value - (TightdbQuery *)endsWith:(NSString *)value caseSensitive:(BOOL)caseSensitive + .CName (TableName_Query *)endsWith:(NSString *)value + .CName (TableName_Query *)endsWith:(NSString *)value caseSensitive:(BOOL)caseSensitive DESCR : *g_typed_query_endsWith_descr SUMMARY : *g_typed_query_endsWith_summary PARAMS: @@ -230,7 +227,7 @@ CATEGORIES : DESCR : *g_typed_query_case_sensitive_descr RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. EXAMPLES: - DESCR : CODE : ex_cpp_typed_query_endsWith @@ -238,8 +235,8 @@ CATEGORIES : - g_typed_query_contains_binary: NAMES : [contains, contains_binary] SIGNATURE: | - (TightdbQuery *)contains:(NSString *)value - (TightdbQuery *)contains:(NSString *)value caseSensitive:(BOOL)caseSensitive + .CName (TableName_Query *)contains:(NSString *)value + .CName (TableName_Query *)contains:(NSString *)value caseSensitive:(BOOL)caseSensitive DESCR : *g_typed_query_contains_descr SUMMARY : *g_typed_query_contains_summary PARAMS: @@ -251,7 +248,170 @@ CATEGORIES : DESCR : *g_typed_query_case_sensitive_descr RETURN: TYPES : Query& - DESCR : The query object. + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_contains + +- Combiners: + METHODS: + - g_typed_query_group: + NAMES : group + SIGNATURE: | + (TableName_Query *)group + DESCR : *g_typed_query_group_descr + SUMMARY : *g_typed_query_group_summary + RETURN: + TYPES : Query + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_group + - g_typed_query_endGroup: + NAMES : endGroup + SIGNATURE: | + (TableName_Query *)endgroup + DESCR : *g_typed_query_endGroup_descr + SUMMARY : *g_typed_query_endGroup_summary + RETURN: + TYPES : Query + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_group + - g_typed_query_or: + NAMES : or + SIGNATURE: | + (TableName_Query *)or + DESCR : *g_typed_query_or_descr + SUMMARY : *g_typed_query_or_summary + RETURN: + TYPES : Query + DESCR : The class of the returned object is defined by a macro. The first part of the class name, specifically TableName, is replaced with the name of your typed table. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_or + + +- Actions: + METHODS: + - g_typed_query_find_all_const: + - g_typed_query_find_all: + NAMES : findAll + DESCR : *g_typed_query_find_all_descr + SUMMARY : *g_typed_query_find_all_summary + SIGNATURE: | + (TableName_View *)findAll + RETURN: + TYPES : [TableView, ConstTableView] + DESCR : The query result represented as a TableName_View. Note that part of the class name, specifically TableName, is replaced with the name of your specific table. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_findall + - g_typed_query_findNext: + NAMES : find_next + SIGNATURE: | + (size_t)findNext:(size_t)last + DESCR : *g_typed_query_find_next_descr + SUMMARY : *g_typed_query_find_next_summary + PARAMS: + - NAME : last + TYPES : size_t + DESCR : "Row to stop search. Default: -1 (infinity)." + RETURN: + TYPES : size_t + DESCR : Row number + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_find_next + - g_typed_query_sum: + - g_typed_query_sum_float: + - g_typed_query_sum_double: + NAMES : [sum, sum_float, sum_double] + DESCR : *g_typed_query_sum_descr + SUMMARY : *g_typed_query_sum_summary + CONST : true + SIGNATURE: | + .CName (int64_t)sum + .CName (double)sum + RETURN: + TYPES : [int64_t, double, double] + DESCR : The sum of the values in the column CName (within the query result). The return type is double in case the column is typed as float or double. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_sum + - g_typed_query_size: + NAMES : count + SIGNATURE: | + (size_t)count + DESCR : *g_typed_query_size_descr + SUMMARY : *g_typed_query_size_summary + CONST : true + RETURN: + TYPES : size_t + DESCR : The number of rows. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_size + - g_typed_query_maximum_date: + - g_typed_query_maximum: + - g_typed_query_maximum_float: + - g_typed_query_maximum_double: + NAMES : [max, maximum_float, maximum_double] + DESCR : *g_typed_query_maximum_descr + SUMMARY : *g_typed_query_maximum_summary + CONST : true + SIGNATURE: | + .CName (int64_t)max + .CName (double)max + RETURN: + TYPES : [int64_t, float, double] + DESCR : The highest value. The return type is double in case the column is typed as float or double. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_maximum + - g_typed_query_minimum: + - g_typed_query_minimum_float: + - g_typed_query_minimum_double: + NAMES : min + DESCR : *g_typed_query_minimum_descr + SUMMARY : *g_typed_query_minimum_summary + CONST : true + SIGNATURE: | + .CName (int64_t)min + .CName (double)min + RETURN: + TYPES : [int64_t, float, double] + DESCR : The lowest value. The return type is double in case the column is typed as float or double. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_manimum + - g_typed_query_average: + - g_typed_query_average_float: + - g_typed_query_average_double: + NAMES : avg + SUMMARY : *g_typed_query_average_summary + DESCR : *g_typed_query_average_descr + CONST : true + SIGNATURE: | + .CName (int64_t)avg + .CName (double)avg + RETURN: + TYPES : double + DESCR : The average. + EXAMPLES: + - DESCR : + CODE : ex_cpp_typed_query_average + - g_typed_query_remove: + NAMES : remove + SIGNATURE: | + (size_t)remove + DESCR : *g_typed_query_remove_descr + SUMMARY : *g_typed_query_remove_summary + CONST : true + RETURN: + TYPES : size_t + DESCR : The number of rows removed. EXAMPLES: - DESCR : - CODE : ex_cpp_typed_query_contains \ No newline at end of file + CODE : ex_cpp_typed_query_remove \ No newline at end of file diff --git a/doc/ref/data/typed_table_ref.yaml b/doc/ref/data/typed_table_ref.yaml index 08cac9f847..d7e4e9e7ea 100755 --- a/doc/ref/data/typed_table_ref.yaml +++ b/doc/ref/data/typed_table_ref.yaml @@ -168,7 +168,7 @@ CATEGORIES: NAMES : remove SUMMARY : *g_typed_table_remove_row_summary DESCR : *g_typed_table_remove_row_descr - SIGNATURE: (void)delete:(size_t)ndx + SIGNATURE: (void)remove:(size_t)ndx PARAMS: - NAME : ndx TYPES : size_t @@ -177,10 +177,10 @@ CATEGORIES: - CODE : ex_cpp_typed_table_remove DESCR : - g_typed_table_remove_last_row: - NAMES : popBack + NAMES : removeLast SUMMARY : *g_typed_table_remove_last_row_summary DESCR : *g_typed_table_remove_last_row_descr - SIGNATURE: (void)popBack + SIGNATURE: (void)removeLast EXAMPLES: - CODE : ex_cpp_typed_table_remove_last_row DESCR : From b31d5141627060f6998af45b4917907e2939ab24 Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Wed, 10 Apr 2013 17:01:44 +0200 Subject: [PATCH 5/9] 1) yaml files in doc/ref/data updated. 2).gitignore updated (*.html in doc/ref) --- .gitignore | 3 + doc/ref/data/dyn_query_ref.yaml | 191 ++++----------- doc/ref/data/dyn_table_ref.yaml | 392 ++++++++++-------------------- doc/ref/data/dyn_view_ref.yaml | 79 ++---- doc/ref/data/reference.yaml | 20 +- doc/ref/data/typed_query_ref.yaml | 4 +- doc/ref/data/typed_view_ref.yaml | 212 ++++------------ 7 files changed, 263 insertions(+), 638 deletions(-) diff --git a/.gitignore b/.gitignore index 579ed97bae..1d43fb800c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ # Test output /employees.tightdb /table_test.tbl + + +/doc/ref/*.html \ No newline at end of file diff --git a/doc/ref/data/dyn_query_ref.yaml b/doc/ref/data/dyn_query_ref.yaml index ae52d9f697..30eb649d07 100755 --- a/doc/ref/data/dyn_query_ref.yaml +++ b/doc/ref/data/dyn_query_ref.yaml @@ -8,29 +8,8 @@ ID : class_dyn_query TITLE : Query (dynamic) -SUMMARY : &g_dyn_query_intro_summary - Query your TightDB table. -DESCR : &g_dyn_query_intro_descr - > - Query objects are used to build up queries. A query is tied to a - {@link class_dyn_table}. The dynamic query class is used in conjunction with the - dynamic table class. - - Conditions is added to a query through a - fluent interface. - This means that the methods representing the conditions will return the - query object. In general, the predicate functions require a column index - as parameter. The compiler cannot infer the correct types as tables are - declared at run time. Using wrong types might lead to run time errors. - - Once the query is ready, it is possible to reuse by multiple calls to - the action methods. - Moreover, it is possible extend the query with new conditions after applying an - action method and thereby implement a drill-down. It is important to stress that - no data is cached, and the new queries cannot benefit from previous queries. - - Alternatively, a query can result in a {@link class_dyn_tableview} which can be further - queried. +SUMMARY : *g_dyn_query_intro_summary +DESCR : *g_dyn_query_intro_descr SEE : EXAMPLES : - DESCR: @@ -55,10 +34,8 @@ CATEGORIES : Query& equal(size_t column_ndx, const char* value, bool case_sensitive=true); Query& equal(size_t column_ndx, BinaryData value); Query& equal_date(size_t column_ndx, time_t value); - SUMMARY : &g_dyn_query_equals_summary - Equal to. - DESCR : &g_dyn_query_equals_descr - Queries for column values which equals a specified value. + SUMMARY : *g_dyn_query_equals_summary + DESCR : *g_dyn_query_equals_descr PARAMS: - NAME : column_ndx TYPES : size_t @@ -68,8 +45,7 @@ CATEGORIES : DESCR : The value. - NAME : case_sensitive TYPES : bool - DESCR : &g_dyn_query_case_sensitive_descr - 'String match can be performed case sensitive or not. Default: true.' + DESCR : *g_dyn_query_case_sensitive_descr RETURN: TYPES : Query& DESCR : The query object. @@ -90,10 +66,8 @@ CATEGORIES : Query& not_equal_date(size_t column_ndx, time_t value); # Query& not_equal(size_t column_ndx, bool value); # Query& not_equal_binary(size_t column_ndx, const char* data, size_t size); - SUMMARY : &g_dyn_query_notEquals_summary - Not equal to. - DESCR : &g_dyn_query_notEquals_descr - Queries for column values which do not equal a specified value. + SUMMARY : *g_dyn_query_notEquals_summary + DESCR : *g_dyn_query_notEquals_descr PARAMS: - NAME : column_ndx TYPES : size_t @@ -118,10 +92,8 @@ CATEGORIES : Query& greater(size_t column_ndx, float value); Query& greater(size_t column_ndx, double value); Query& greater_date(size_t column_ndx, time_t value); - SUMMARY : &g_dyn_query_greaterThan_summary - Greater than. - DESCR : &g_dyn_query_greaterThan_descr - Queries for column values greater than a specified value. + SUMMARY : *g_dyn_query_greaterThan_summary + DESCR : *g_dyn_query_greaterThan_descr PARAMS: - NAME : column_ndx TYPES : size_t @@ -143,10 +115,8 @@ CATEGORIES : Query& greater_equal(size_t column_ndx, float value); Query& greater_equal(size_t column_ndx, double value); Query& greater_equal_date(size_t column_ndx, time_t value); - SUMMARY : &g_dyn_query_greaterThanOrEqual_summary - Greater than or equal to. - DESCR : &g_dyn_query_greaterThanOrEqual_descr - Queries for column values greater than or equal to a specified value. + SUMMARY : *g_dyn_query_greaterThanOrEqual_summary + DESCR : *g_dyn_query_greaterThanOrEqual_descr PARAMS: - NAME : column_ndx TYPES : size_t @@ -168,10 +138,8 @@ CATEGORIES : Query& less(size_t column_ndx, float value); Query& less(size_t column_ndx, double value); Query& less_date(size_t column_ndx, time_t value); - SUMMARY : &g_dyn_query_lessThan_summary - Less than. - DESCR : &g_dyn_query_lessThan_descr - Queries for column values less than a specified value. + SUMMARY : *g_dyn_query_lessThan_summary + DESCR : *g_dyn_query_lessThan_descr PARAMS: - NAME : column_ndx TYPES : size_t @@ -193,10 +161,8 @@ CATEGORIES : Query& less_equal(size_t column_ndx, int64_t value); Query& less_equal(size_t column_ndx, int64_t value); Query& less_equal_date(size_t column_ndx, time_t value); - SUMMARY : &g_dyn_query_lessThanOrEqual_summary - Less than or equal to. - DESCR : &g_dyn_query_lessThanOrEqual_descr - Queries for column values less than or equal to a specified value. + SUMMARY : *g_dyn_query_lessThanOrEqual_summary + DESCR : *g_dyn_query_lessThanOrEqual_descr PARAMS: - NAME : column_ndx TYPES : size_t @@ -218,10 +184,8 @@ CATEGORIES : Query& between(size_t column_ndx, float from, float to); Query& between(size_t column_ndx, double from, double to); Query& between_date(size_t column_ndx, time_t from, time_t to); - DESCR : &g_dyn_query_between_descr - Queries for column values in ranges. - SUMMARY : &g_dyn_query_between_summary - Belongs to an interval. + DESCR : *g_dyn_query_between_descr + SUMMARY : *g_dyn_query_between_summary PARAMS: - NAME : column_ndx TYPES : size_t @@ -244,10 +208,8 @@ CATEGORIES : SIGNATURE: | Query& begins_with(size_t column_ndx, const char* value, bool case_sensitive=true); # Query& begins_with_binary(size_t column_ndx, const char* data, size_t size); - DESCR : &g_dyn_query_startsWith_descr - Queries for column values which begin with a certain prefix. - SUMMARY : &g_dyn_query_startsWith_summary - Substring match at the begining of the attribute. + DESCR : *g_dyn_query_startsWith_descr + SUMMARY : *g_dyn_query_startsWith_summary PARAMS: - NAME : column_ndx TYPES : size_t @@ -270,10 +232,8 @@ CATEGORIES : SIGNATURE: | Query& ends_with(size_t column_ndx, const char* value, bool case_sensitive=true); # Query& ends_with_binary(size_t column_ndx, const char* data, size_t size); - DESCR : &g_dyn_query_endsWith_descr - Queries for column values which end with a specified suffix. - SUMMARY : &g_dyn_query_endsWith_summary - Substring match at the end of the value in the column column_ndx. + DESCR : *g_dyn_query_endsWith_descr + SUMMARY : *g_dyn_query_endsWith_summary PARAMS: - NAME : column_ndx TYPES : size_t @@ -296,10 +256,8 @@ CATEGORIES : SIGNATURE: | Query& contains(size_t column_ndx, const char* value, bool case_sensitive=true); # Query& contains_binary(size_t column_ndx, const char* data, size_t size); - DESCR : &g_dyn_query_contains_descr - Queries for column values which contain the specified substring. - SUMMARY : &g_dyn_query_contains_summary - Substring search. + DESCR : *g_dyn_query_contains_descr + SUMMARY : *g_dyn_query_contains_summary PARAMS: - NAME : column_ndx TYPES : size_t @@ -320,12 +278,8 @@ CATEGORIES : METHODS: - g_dyn_query_group: NAMES : group - DESCR : &g_dyn_query_group_descr - > - Group conditions ("left" parenthesis). Group of conditions can be nested and they are - conceptually a parenthesis. - SUMMARY : &g_dyn_query_group_summary - Start group ("left parenthesis"). + DESCR : *g_dyn_query_group_descr + SUMMARY : *g_dyn_query_group_summary RETURN: TYPES : Query DESCR : The query object. @@ -334,10 +288,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_group - g_dyn_query_endGroup: NAMES : end_group - DESCR : &g_dyn_query_endGroup_descr - Group conditions ("right" parenthesis). - SUMMARY : &g_dyn_query_endGroup_summary - Stop group ("right parenthesis"). + DESCR : *g_dyn_query_endGroup_descr + SUMMARY : *g_dyn_query_endGroup_summary RETURN: TYPES : Query DESCR : The query object. @@ -346,10 +298,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_group - g_dyn_query_or: NAMES : Or - DESCR : &g_dyn_query_or_descr - Conditions to the left and right are folded using logical-or. - SUMMARY : &g_dyn_query_or_summary - Logical-or. + DESCR : *g_dyn_query_or_descr + SUMMARY : *g_dyn_query_or_summary RETURN: TYPES : Query DESCR : The query object. @@ -358,10 +308,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_or - g_dyn_query_subtable: NAMES : subtable - DESCR : &g_dyn_query_subtable_descr - Query a subtable. - SUMMARY : &g_dyn_query_subtable_summary - Query a subtable. + DESCR : *g_dyn_query_subtable_descr + SUMMARY : *g_dyn_query_subtable_summary PARAMS: - NAME : column TYPES : size_t @@ -374,10 +322,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_subtable - g_dyn_query_endSubtable: NAMES : end_subtable - DESCR : &g_dyn_query_endSubtable_descr - End of subtable query. - SUMMARY : &g_dyn_query_endSubtable_summary - End of subtable query. + DESCR : *g_dyn_query_endSubtable_descr + SUMMARY : *g_dyn_query_endSubtable_summary RETURN: TYPES : Query DESCR : The query object. @@ -389,10 +335,8 @@ CATEGORIES : - g_dyn_query_find_all_const: - g_dyn_query_find_all: NAMES : find_all - DESCR : &g_dyn_query_find_all_descr - This method executes the query. See the {@link class_dyn_tableview} class for further details. - SUMMARY : &g_dyn_query_find_all_summary - Execute query. + DESCR : *g_dyn_query_find_all_descr + SUMMARY : *g_dyn_query_find_all_summary SIGNATURE: | TableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); ConstTableView find_all(size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); @@ -414,10 +358,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_findall - g_dyn_query_find_next: NAMES : find_next - DESCR : &g_dyn_query_find_next_descr - Find next row. - SUMMARY : &g_dyn_query_find_next_summary - Find next row. + DESCR : *g_dyn_query_find_next_descr + SUMMARY : *g_dyn_query_find_next_summary PARAMS: - NAME : lastmatch TYPES : size_t @@ -432,14 +374,8 @@ CATEGORIES : - g_dyn_query_sum_float: - g_dyn_query_sum_double: NAMES : [sum, sum_float, sum_double] - DESCR : &g_dyn_query_sum_descr - | - This methods calculates the sum of the values in a specific column. - - Note: sum() can overflow depending on the values stored. Nothing will indicate this. - Note: Adding many floats or doubles can accumulate representation imprecisions. - SUMMARY : &g_dyn_query_sum_summary - Calculate sum. + DESCR : *g_dyn_query_sum_descr + SUMMARY : *g_dyn_query_sum_summary CONST : true SIGNATURE: | int64_t sum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; @@ -469,10 +405,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_sum - g_dyn_query_size: NAMES : count - DESCR : &g_dyn_query_size_descr - The method finds the number of matching rows. - SUMMARY : &g_dyn_query_size_summary - Number of matching rows. + DESCR : *g_dyn_query_size_descr + SUMMARY : *g_dyn_query_size_summary CONST : true PARAMS: - NAME : column @@ -498,10 +432,8 @@ CATEGORIES : - g_dyn_query_maximum_float: - g_dyn_query_maximum: NAMES : maximum - DESCR : &g_dyn_query_maximum_descr - This method finds the highest value in the column or in a range of rows in the column. - SUMMARY : &g_dyn_query_maximum_summary - Highest value. + DESCR : *g_dyn_query_maximum_descr + SUMMARY : *g_dyn_query_maximum_summary CONST : true SIGNATURE: | int64_t maximum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; @@ -535,10 +467,8 @@ CATEGORIES : - g_dyn_query_minimum_float: - g_dyn_query_minimum: NAMES : minimum - DESCR : &g_dyn_query_minimum_descr - This method finds the lowest value in the column or in a range of rows in the column. - SUMMARY : &g_dyn_query_minimum_summary - Lowest value. + DESCR : *g_dyn_query_minimum_descr + SUMMARY : *g_dyn_query_minimum_summary CONST : true SIGNATURE: | int64_t minimum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; @@ -571,14 +501,8 @@ CATEGORIES : - g_dyn_query_average_float: - g_dyn_query_average: NAMES : average - SUMMARY : &g_dyn_query_average_summary - Calculates the average. - DESCR : &g_dyn_query_average_descr - | - The method calculates the average of a specific column. - - Note: average() uses sum() which can overflow depending on the values stored. Nothing will indicate this. - Note: Averaging many floats or doubles can accumulate representation imprecisions. + SUMMARY : *g_dyn_query_average_summary + DESCR : *g_dyn_query_average_descr CONST : true SIGNATURE: | double average(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; @@ -608,10 +532,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_average - g_dyn_query_remove: NAMES : remove - DESCR : &g_dyn_query_remove_descr - This method will remove all matching rows in the source table. - SUMMARY : &g_dyn_query_remove_summary - Remove rows. + DESCR : *g_dyn_query_remove_descr + SUMMARY : *g_dyn_query_remove_summary CONST : true PARAMS: - NAME : column @@ -640,13 +562,8 @@ CATEGORIES : - g_dyn_query_find_all_multi: - g_dyn_query_find_all_const_multi: NAMES : find_all_multi - DESCR : &g_dyn_query_find_all_multi_descr - > - This method execute a query using (POSIX) threads that is, the query is parallellized and - can lower the search time on a multi-core computer. See the {@link class_dyn_tableview} class - for further details. - SUMMARY : &g_dyn_query_find_all_multi_summary - Execute query. + DESCR : *g_dyn_query_find_all_multi_descr + SUMMARY : *g_dyn_query_find_all_multi_summary SIGNATURE: | TableView find_all_multi(Table& table, size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); ConstTableView find_all_multi(const Table& table, size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); @@ -669,10 +586,8 @@ CATEGORIES : CODE : ex_cpp_dyn_query_find_all_multi - g_dyn_query_set_threads: NAMES : set_threads - SUMMARY : &g_dyn_query_set_threads_summary - Set the number of threads. - DESCR : &g_dyn_query_set_threads_descr - The method sets the number of threads used by {@link g_dyn_query_find_all_multi}. + SUMMARY : *g_dyn_query_set_threads_summary + DESCR : *g_dyn_query_set_threads_descr PARAMS: - NAME : threadcount TYPES : unsigned int diff --git a/doc/ref/data/dyn_table_ref.yaml b/doc/ref/data/dyn_table_ref.yaml index 2da5c39bb0..816a726e40 100755 --- a/doc/ref/data/dyn_table_ref.yaml +++ b/doc/ref/data/dyn_table_ref.yaml @@ -1,36 +1,11 @@ # -# C++ reference documentation for Table class +# Obj-C reference documentation for Table class # ID : class_dyn_table TITLE : Table (dynamic) -SUMMARY : &g_dyn_table_intro_summary - TightDB table. -DESCR : &g_dyn_table_intro_descr - The Table class is the core class of the TightDB framework. It allows you - to efficiently work with data in terms of rows and columns. The value of - a cell (specific column, specific row) is compacted in order to keep the - overall memory consumption as little as possible. The internal data structure - is optimized so retrieving a particular row in a table is as fast as possible - (often faster than native data structures). - - The dynamic table can be used when the structure of the data is not known a - priori. This situation is common if you recieve data for different sources, and - these sources changes often. You can say that a dynamic table resembles the - flexible data structures often found in dynamic languages like PHP and JavaScript. - - You can add and remove columns at run time as your application requires it. When you - add a column, a type must be specified. The most common types including integers, - timestamps and strings are suppotted. It is possible to use a TightDB table class - as column type. This means that you can have tables of tables structure. - - Moreover, TightDB introduces a column type called {@link class_mixed}. A value of the - Mixed type can be any supported value of TightDB. This implies - as the name - indicates - that you can mix the type of values in the the column. In one row the - value could be an integer, in another row the value could be a string or even a table. - - It is possible to query a dynamic table using {@link class_dyn_query} objects. The result - set is often stored in a {@link class_dyn_tableview} object. +SUMMARY : *g_dyn_table_intro_summary +DESCR : *g_dyn_table_intro_descr SEE : EXAMPLES : - DESCR: @@ -40,11 +15,10 @@ CATEGORIES : - State: METHODS: - g_dyn_table_size: - NAMES : size - SUMMARY : &g_dyn_table_size_summary - Number of rows. - DESCR : &g_dyn_table_size_descr - This method gets the number of rows in a table. + NAMES : count + SUMMARY : *g_dyn_table_size_summary + DESCR : *g_dyn_table_size_descr + SIGNATURE: (size_t)count CONST : True RETURN: TYPES : size_t @@ -53,11 +27,10 @@ CATEGORIES : - CODE : ex_cpp_dyn_table_size DESCR : - g_dyn_table_is_empty: - NAMES : is_empty - SUMMARY : &g_dyn_table_is_empty_summary - Is table empty? - DESCR : &g_dyn_table_is_empty_descr - This method checks if the table is empty that is, it has zero rows. + NAMES : isEmpty + SUMMARY : *g_dyn_table_is_empty_summary + DESCR : *g_dyn_table_is_empty_descr + SIGNATURE: (BOOL)isEmpty CONST : True RETURN: TYPES : bool @@ -66,12 +39,9 @@ CATEGORIES : - CODE : ex_cpp_dyn_table_is_empty DESCR : - g_dyn_table_is_valid: - NAMES : is_valid - SUMMARY : &g_dyn_table_is_valid_summary - Is table valid/consistent? - DESCR : &g_dyn_table_is_valid_descr - This method will perform a number of consistency checks on a table and its - columns. + NAMES : isValid (not yet implemented) + SUMMARY : *g_dyn_table_is_valid_summary + DESCR : *g_dyn_table_is_valid_descr CONST : true RETURN: TYPES : bool @@ -83,45 +53,28 @@ CATEGORIES : METHODS: - g_dyn_table_clear: NAMES : clear - SUMMARY : &g_dyn_table_clear_summary - Remove all rows. - DESCR : &g_dyn_table_clear_descr - This method will remove all rows in a table. + SUMMARY : *g_dyn_table_clear_summary + DESCR : *g_dyn_table_clear_descr + SIGNATURE: (void)clear EXAMPLES: - CODE : ex_cpp_dyn_table_clear DESCR : - g_dyn_table_optimize: NAMES : optimize - SUMMARY : &g_dyn_table_optimize_summary - Optimize a table. - DESCR : &g_dyn_table_optimize_descr - This method will optimize the internal data structures of a table. - The result is that the table will consume less memory and queries might - be faster. - - This should be called as soon as there is an representative amount of - data in the table. The table will then reorganize itself into the most - effective format. - - What is learned about the contents will be used in all future operations, - so you only need to call optimize once. + SUMMARY : *g_dyn_table_optimize_summary + DESCR : *g_dyn_table_optimize_descr + SIGNATURE: (void)optimize EXAMPLES: - CODE : ex_cpp_dyn_table_optimize DESCR : - g_dyn_table_opertator==: - NAMES : operator== - SUMMARY : &g_dyn_table_operator_eq_summary - Compare two tables. - DESCR : &g_dyn_table_operator_eq_descr - Compare two tables for equality. Two tables are equal if, and - only if, they contain the same columns and rows in the same - order, that is, for each value V of type T at column index C - and row index R in one of the tables, there is a value of type - T at column index C and row index R in the other table that - is equal to V. This method returns true if two tables are identical. + NAMES : isEqual + SUMMARY : *g_dyn_table_operator_eq_summary + DESCR : *g_dyn_table_operator_eq_descr + SIGNATURE: (BOOL)isEqual:(TightdbTable *)other CONST : True PARAMS: - - NAME : table + - NAME : other TYPES : const Table& DESCR : The other table. RETURN: @@ -130,36 +83,13 @@ CATEGORIES : EXAMPLES: - CODE : ex_cpp_dyn_table_operator== DESCR : - - g_dyn_table_opertator!=: - NAMES : operator!= - SUMMARY : &g_dyn_table_operator_neq_summary - Compare two tables. - DESCR : &g_dyn_table_operator_neq_descr - Compare two tables for equality. Two tables are equal if, and - only if, they contain the same columns and rows in the same - order, that is, for each value V of type T at column index C - and row index R in one of the tables, there is a value of type - T at column index C and row index R in the other table that - is equal to V. This method returns true if two tables are not identical. - CONST : True - PARAMS: - - NAME : table - TYPES : const Table& - DESCR : The other table. - RETURN: - TYPES : bool - DESCR : true if the two tables are not equal, false otherwise, - EXAMPLES: - - CODE : ex_cpp_dyn_table_operator!= - DESCR : - Columns: METHODS: - g_dyn_table_get_column_count: - NAMES : get_column_count - SUMMARY : &g_dyn_table_get_column_count_summary - Get the number of columns. - DESCR : &g_dyn_table_get_column_count_descr - This method retrieves the number of columns. + NAMES : getColumnCount + SUMMARY : *g_dyn_table_get_column_count_summary + DESCR : *g_dyn_table_get_column_count_descr + SIGNATURE: (size_t)getColumnCount CONST : True RETURN: TYPES : size_t @@ -168,14 +98,13 @@ CATEGORIES : - CODE : ex_cpp_dyn_table_get_column_count DESCR : - g_dyn_table_get_column_name: - NAMES : get_column_name - SUMMARY : &g_dyn_table_get_column_name_summary - Get the name of a column. - DESCR : &g_dyn_table_get_column_name_descr - This method gets the name of a column using the column index. + NAMES : getColumnName + SUMMARY : *g_dyn_table_get_column_name_summary + DESCR : *g_dyn_table_get_column_name_descr + SIGNATURE: (NSString *)getColumnName:(size_t)ndx CONST : True PARAMS: - - NAME : column_ndx + - NAME : ndx TYPES : size_t DESCR : The column index. RETURN: @@ -185,14 +114,13 @@ CATEGORIES : - CODE : ex_cpp_dyn_table_get_column_name DESCR : - g_dyn_table_get_column_index: - NAMES : get_column_index - SUMMARY : &g_dyn_table_get_column_index_summary - Get the index of a column. - DESCR : &g_dyn_table_get_column_index_descr - This method gets the index of a column using the column name. + NAMES : getColumnIndex + SUMMARY : *g_dyn_table_get_column_index_summary + DESCR : *g_dyn_table_get_column_index_descr + SIGNATURE: (size_t)getColumnIndex:(NSString *)name CONST : True PARAMS: - - NAME : column_name + - NAME : name TYPES : const char* DESCR : The column name. RETURN: @@ -202,27 +130,26 @@ CATEGORIES : - CODE : ex_cpp_dyn_table_get_column_index DESCR : - g_dyn_table_get_column_type: - NAMES : get_column_type - SUMMARY : &g_dyn_table_get_column_type_summary - Get the type of a column. - DESCR : &g_dyn_table_get_column_type_descr - > + NAMES : getColumnType + SUMMARY : *g_dyn_table_get_column_type_summary + DESCR : > This method gets the type of a column using the column index. Currently, the following types are supported:
    -
  • type_Bool
  • -
  • type_Int
  • -
  • type_Float
  • -
  • type_Double
  • -
  • type_String
  • -
  • type_Binary
  • -
  • type_Table
  • -
  • type_Date
  • -
  • type_Mixed
  • -
+
  • tightdb_Bool
  • +
  • tightdb_Int
  • +
  • tightdb_Float
  • +
  • tightdb_Double
  • +
  • tightdb_String
  • +
  • tightdb_Binary
  • +
  • tightdb_Table
  • +
  • tightdb_Date
  • +
  • tightdb_Mixed
  • + + SIGNATURE: (TightdbType)getColumnType:(size_t)ndx CONST : True PARAMS: - - NAME : column_ndx + - NAME : ndx TYPES : size_t DESCR : The column index. RETURN: @@ -234,23 +161,18 @@ CATEGORIES : - Rows: METHODS: - g_dyn_table_add_empty_row: - NAMES : add_empty_row - SUMMARY : &g_dyn_table_add_empty_row_summary - Add empty rows. - DESCR : &g_dyn_table_add_empty_row_descr - This method adds one or more empty rows at the end of the table. - SIGNATURE: | - void add_empty_row(size_t num_rows = 1) + NAMES : addRow + SUMMARY : *g_dyn_table_add_empty_row_summary + DESCR : *g_dyn_table_add_empty_row_descr + SIGNATURE: (size_t)addRow PARAMS: - NAME : num_rows TYPES : size_t DESCR : "Number of rows to add (default: 1)." - g_dyn_table_insert_empty_row: - NAMES : insert_empty_row - SUMMARY : &g_dyn_table_insert_empty_row_summary - Insert empty rows. - DESCR : &g_dyn_table_insert_empty_row_descr - This method inserts one or more empty rows at a given position. + NAMES : insertRow (not yet implemented) + SUMMARY : *g_dyn_table_insert_empty_row_summary + DESCR : *g_dyn_table_insert_empty_row_descr SIGNATURE: | void insert_empty_row(size_t row_ndx, size_t num_rows = 1) PARAMS: @@ -268,34 +190,23 @@ CATEGORIES : - g_dyn_table_insert_binary: - g_dyn_table_insert_mixed: - g_dyn_table_insert_done: - NAMES : insert_* - SUMMARY : &g_dyn_table_insert_xxx_summary - Insert a value. - DESCR : &g_dyn_table_insert_xxx_descr - > - These methods are used to insert new rows in a table. - - WARNING: These methods support inserts with maximal performance. - But they can easily corrupt the database if used incorrectly! When inserting - a new row, you have to call the corresponding insert method for every column in the table - and end the insert sequence by calling {@link g_dyn_table_insert_done insert_done()}. - - insert_binary() will copy the data provided. - + NAMES : insert* + SUMMARY : *g_dyn_table_insert_xxx_summary + DESCR : *g_dyn_table_insert_xxx_descr SIGNATURE: | - void insert_bool(size_t column_ndx, size_t row_ndx, bool value) - void insert_int(size_t column_ndx, size_t row_ndx, int64_t value) - templatevoid insert_enum(size_t column_ndx, size_t row_ndx, E value) - void insert_float(size_t column_ndx, size_t row_ndx, float value) - void insert_double(size_t column_ndx, size_t row_ndx, double value) - void insert_date(size_t column_ndx, size_t row_ndx, time_t value) - void insert_string(size_t column_ndx, size_t row_ndx, const char* value) - void insert_binary(size_t column_ndx, size_t row_ndx, const char* value, size_t len) - void insert_mixed(size_t column_ndx, size_t row_ndx, Mixed value) - void insert_subtable(size_t column_ndx, size_t row_ndx) - void insert_done() + (void)insertBool:(size_t)col_ndx ndx:(size_t)ndx value:(BOOL)value + (void)insertInt:(size_t)col_ndx ndx:(size_t)ndx value:(int64_t)value + (void)insertFloat:(size_t)col_ndx ndx:(size_t)ndx value:(float)value + (void)insertDouble:(size_t)col_ndx ndx:(size_t)ndx value:(double)value + (void)insertDate:(size_t)col_ndx ndx:(size_t)ndx value:(time_t)value + (void)insertString:(size_t)col_ndx ndx:(size_t)ndx value:(NSString *)value + (void)insertBinary:(size_t)col_ndx ndx:(size_t)ndx value:(TightdbBinary *)value + (void)insertBinary:(size_t)col_ndx ndx:(size_t)ndx data:(const char *)data size:(size_t)size + (void)insertMixed:(size_t)col_ndx ndx:(size_t)row_ndx value:(TightdbMixed *)value + (void)insertSubtable:(size_t)col_ndx ndx:(size_t)row_ndx + (void)insertDone PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : The column index. - NAME : row_ndx @@ -304,7 +215,7 @@ CATEGORIES : - NAME : value TYPES : [bool, int64_t, float, double, time_t, const char*, Mixed] DESCR : The value to insert. - - NAME : len + - NAME : size TYPES : size_t DESCR : Size in bytes of binary value. EXAMPLES: @@ -314,10 +225,8 @@ CATEGORIES : - g_dyn_table_remove_row: NAMES : remove - SUMMARY : &g_dyn_table_remove_row_summary - Delete row. - DESCR : &g_dyn_table_remove_row_descr - This method deletes a specific row. + SUMMARY : *g_dyn_table_remove_row_summary + DESCR : *g_dyn_table_remove_row_descr SIGNATURE: void remove(size_t row_ndx); PARAMS: - NAME : row_ndx @@ -328,10 +237,8 @@ CATEGORIES : DESCR : - g_dyn_table_remove_last_row: NAMES : remove_last - SUMMARY : &g_dyn_table_remove_last_row_summary - Delete last row. - DESCR : &g_dyn_table_remove_last_row_descr - This method deletes the last row. Calling it on an empty table is an error. + SUMMARY : *g_dyn_table_remove_last_row_summary + DESCR : *g_dyn_table_remove_last_row_descr SIGNATURE: void remove_last(); EXAMPLES: - CODE : ex_cpp_dyn_table_remove_last_row @@ -348,10 +255,8 @@ CATEGORIES : - g_dyn_table_get_subtable: - g_dyn_table_get_subtable_const: NAMES : get_* - SUMMARY : &g_dyn_table_get_xxx_summary - Get value. - DESCR : &g_dyn_table_get_xxx_descr - This method will retrieve the value of a cell (row/column). + SUMMARY : *g_dyn_table_get_xxx_summary + DESCR : *g_dyn_table_get_xxx_descr SIGNATURE: | bool get_bool(size_t column_ndx, size_t row_ndx) const; int64_t get_int(size_t column_ndx, size_t row_ndx) const; @@ -387,10 +292,8 @@ CATEGORIES : - g_dyn_table_set_binary: - g_dyn_table_set_mixed: NAMES : set_* - SUMMARY : &g_dyn_table_set_xxx_summary - Set value. - DESCR : &g_dyn_table_set_xxx_descr - This method will set the value of an existing cell (row/column). + SUMMARY : *g_dyn_table_set_xxx_summary + DESCR : *g_dyn_table_set_xxx_descr SIGNATURE: | void set_bool(size_t column_ndx, size_t row_ndx, bool value); void set_int(size_t column_ndx, size_t row_ndx, int64_t value); @@ -421,11 +324,9 @@ CATEGORIES : METHODS: - g_dyn_table_get_subtable_size: NAMES : get_subtable_size - SUMMARY : &g_dyn_table_get_subtable_size_summary - Get subtable - DESCR : &g_dyn_table_get_subtable_size_descr - The value of a cell can be a table. Such a value is referred to as - a subtable. This method retrieves the number of rows of a subtable. + SUMMARY : *g_dyn_table_get_subtable_size_summary + DESCR : *g_dyn_table_get_subtable_size_descr + SIGNATURE: CONST : true PARAMS: - NAME : column_ndx @@ -442,11 +343,9 @@ CATEGORIES : DESCR : - g_dyn_table_clear_subtable: NAMES : clear_subtable - SUMMARY : &g_dyn_table_clear_subtable_summary - Get subtable - DESCR : &g_dyn_table_clear_subtable_descr - The value of a cell can be a table. Such a value is referred to - as a subtable. This method deletes all rows of such a subtable. + SUMMARY : *g_dyn_table_clear_subtable_summary + DESCR : *g_dyn_table_clear_subtable_descr + SIGNATURE: PARAMS: - NAME : column_ndx TYPES : size_t @@ -461,11 +360,9 @@ CATEGORIES : METHODS: - g_dyn_table_set_index: NAMES : set_index - SUMMARY : &g_dyn_table_set_index_summary - Add an index to a column. - DESCR : &g_dyn_table_set_index_descr - This method adds an index to a column, and queries will be faster but the table - will require more memory. + SUMMARY : *g_dyn_table_set_index_summary + DESCR : *g_dyn_table_set_index_descr + SIGNATURE: PARAMS: - NAME : column_ndx TYPES : size_t @@ -478,10 +375,9 @@ CATEGORIES : DESCR : - g_dyn_table_has_index: NAMES : has_index - SUMMARY : &g_dyn_table_has_index_summary - Is column indexed? - DESCR : &g_dyn_table_has_index_descr - This method checks if a specific column has an index. + SUMMARY : *g_dyn_table_has_index_summary + DESCR : *g_dyn_table_has_index_descr + SIGNATURE: CONST : true PARAMS: - NAME : column_ndx @@ -497,13 +393,9 @@ CATEGORIES : METHODS: - g_dyn_table_lookup: NAMES : lookup - SUMMARY : &g_dyn_table_lookup_summary - Lookup a value. - DESCR : &g_dyn_table_lookup_descr - This method will find the first row where the value of first column matches - a given string value. Defining the first column as a string with unique values, - it is possible to combine such a table with this method to emulate a hash - array using TightDB. + SUMMARY : *g_dyn_table_lookup_summary + DESCR : *g_dyn_table_lookup_descr + SIGNATURE: CONST : True PARAMS: - NAME : value @@ -591,11 +483,8 @@ CATEGORIES : - g_dyn_table_get_sorted_view: - g_dyn_table_get_sorted_view_const: NAMES : get_sorted_view - SUMMARY : &g_dyn_table_get_sorted_view_summary - Sort the table. - DESCR : &g_dyn_table_get_sorted_view_desc - This method will sort the rows by using values of a given column. - The rows are returned as a {@link class_dyn_tableview} object. + SUMMARY : *g_dyn_table_get_sorted_view_summary + DESCR : *g_dyn_table_get_sorted_view_desc SIGNATURE: | TableView get_sorted_view(size_t column_ndx, bool ascending=true); ConstTableView get_sorted_view(size_t column_ndx, bool ascending=true) const; @@ -605,8 +494,7 @@ CATEGORIES : DESCR : The column index. - NAME : ascending TYPES : bool - DESCR : &cpp_dyn_table_get_sorted_view_param - "If true, rows are sorted ascending, otherwise descending. Default: true." + DESCR : *cpp_dyn_table_get_sorted_view_param RETURN: TYPES : TableView DESCR : A view. @@ -616,13 +504,8 @@ CATEGORIES : - g_dyn_table_distinct: - g_dyn_table_distinct_const: NAMES : distinct - SUMMARY : &g_dyn_table_distinct_summary - Get distinct rows. - DESCR : &g_dyn_table_distinct_desc - > - This method will return a view with distinct rows for a given column - (first matching row for each unique value in column). - The rows are returned as a {@link class_dyn_tableview} object. + SUMMARY : *g_dyn_table_distinct_summary + DESCR : *g_dyn_table_distinct_desc SIGNATURE: | TableView distinct(size_t column_ndx); ConstTableView distinct(size_t column_ndx) const; @@ -654,12 +537,9 @@ CATEGORIES : METHODS: - g_dyn_table_count_int: NAMES : count_int - SUMMARY : &g_dyn_table_count_summary - Number of matching rows. - DESCR : &g_dyn_table_count_descr - This method gets the number of rows matching a value. It is useful - to determine the number briefly compared to using a {@link class_dyn_query} - object. + SUMMARY : *g_dyn_table_count_summary + DESCR : *g_dyn_table_count_descr + SIGNATURE: CONST : True PARAMS: - NAME : column_ndx @@ -676,12 +556,8 @@ CATEGORIES : DESCR : - g_dyn_table_count_string: NAMES : count_string - SUMMARY : &g_dyn_table_count_string_summary - Number of matching rows. - DESCR : &g_dyn_table_count_string_descr - This method gets the number of rows matching a string value. It is useful - to determine the number briefly compared to using a {@link class_dyn_query} - object. + SUMMARY : *g_dyn_table_count_string_summary + DESCR : *g_dyn_table_count_string_descr CONST : True PARAMS: - NAME : column_ndx @@ -700,10 +576,8 @@ CATEGORIES : - g_dyn_table_sum_float: - g_dyn_table_sum_double: NAMES : [sum, sum_float, sum_double] - SUMMARY : &g_dyn_table_sum_summary - Calculates the sum. - DESCR : &g_dyn_table_sum_descr - This method calculates the sum of a specific column. + SUMMARY : *g_dyn_table_sum_summary + DESCR : *g_dyn_table_sum_descr SIGNATURE: | int64_t sum(size_t column_ndx) const; double sum_float(size_t column_ndx) const; @@ -723,10 +597,8 @@ CATEGORIES : - g_dyn_table_maximum_float: - g_dyn_table_maximum_double: NAMES : [maximum, maximum_float, maximum_double] - SUMMARY : &g_dyn_table_maximum_summary - Find highest value. - DESCR : &g_dyn_table_maximum_descr - The method finds the highest value. + SUMMARY : *g_dyn_table_maximum_summary + DESCR : *g_dyn_table_maximum_descr SIGNATURE: | int64_t maximum(size_t column_ndx) const; float maximum_float(size_t column_ndx) const; @@ -746,10 +618,8 @@ CATEGORIES : - g_dyn_table_minimum_float: - g_dyn_table_minimum_double: NAMES : [minimum, minimum_float, minimum_double] - SUMMARY : &g_dyn_table_minimum_summary - Find lowest value. - DESCR : &g_dyn_table_minimum_descr - The method finds the lowest value. + SUMMARY : *g_dyn_table_minimum_summary + DESCR : *g_dyn_table_minimum_descr CONST : True SIGNATURE: | int64_t minimum(size_t column_ndx) const; @@ -769,10 +639,8 @@ CATEGORIES : - g_dyn_table_average_float: - g_dyn_table_average_double: NAMES : [average, average_float, average_double] - SUMMARY : &g_dyn_table_average_summary - Calculates the average. - DESCR : &g_dyn_table_average_descr - This method calculates the average for a column. + SUMMARY : *g_dyn_table_average_summary + DESCR : *g_dyn_table_average_descr CONST : True SIGNATURE: | double average(size_t column_ndx) const; @@ -792,12 +660,8 @@ CATEGORIES : METHODS: - g_dyn_table_to_json: NAMES : to_json - SUMMARY : &g_dyn_table_to_json_summary - Convert table to JSON. - DESCR : &g_dyn_table_to_json_descr - The JavaScript Object Notation (JSON) is useful - for web/mobile applications and serialization. This method will convert a table - and its columns and rows to a JSON compatible representation. + SUMMARY : *g_dyn_table_to_json_summary + DESCR : *g_dyn_table_to_json_descr PARAMS: - NAME : out TYPES : std::ostream& @@ -807,12 +671,8 @@ CATEGORIES : DESCR : - g_dyn_table_to_string: NAMES : to_string - SUMMARY : &g_dyn_table_to_string_summary - Convert table to a string. - DESCR : &g_dyn_table_to_string_descr - > - This method will convert a table and its columns and rows to a format - which is easily read by humans. + SUMMARY : *g_dyn_table_to_string_summary + DESCR : *g_dyn_table_to_string_descr CONST : true PARAMS: - NAME : out @@ -826,12 +686,8 @@ CATEGORIES : DESCR : - g_dyn_table_row_to_string: NAMES : to_string - SUMMARY : &g_dyn_table_row_to_string_summary - Convert a row to a string. - DESCR : &g_dyn_table_row_to_string_descr - > - This method will convert a row to a format - which is easily read by humans. + SUMMARY : *g_dyn_table_row_to_string_summary + DESCR : *g_dyn_table_row_to_string_descr CONST : true PARAMS: - NAME : row_ndx diff --git a/doc/ref/data/dyn_view_ref.yaml b/doc/ref/data/dyn_view_ref.yaml index 245aa888eb..792acfb250 100755 --- a/doc/ref/data/dyn_view_ref.yaml +++ b/doc/ref/data/dyn_view_ref.yaml @@ -1,31 +1,11 @@ # -# C++ reference documentation for TableView class +# Obj-C reference documentation for TableView class # ID : class_dyn_tableview TITLE : TableView (dynamic) -SUMMARY : &g_dyn_view_intro_summary - The TableView class. -DESCR : &g_dyn_view_intro_descr - > - Queries and searches can return TableView - objects, which works as virtual tables containing just - the matched rows. You can interact with a - TableView just as a regular table. - - A {@link class_dyn_tableview} is implicitely linked to a - {@link class_dyn_table}. All changes to the view will - propagate to the original table. This includes operations - like updating values and deleting rows. - - Notice that this does not imply that it will work the - opposite direction. Any change that adds or removes rows - in the original table will invalidate the view, and you - will have an inconsistent view of the table. This might - lead to a serious data corruption. - - It is possible to create two views for the table as - long as you do not change the original table. +SUMMARY : *g_dyn_view_intro_summary +DESCR : *g_dyn_view_intro_descr SEE : EXAMPLES : - DESCR: @@ -47,10 +27,8 @@ CATEGORIES : DESCR : - g_dyn_view_is_empty: NAMES : is_empty - SUMMARY : &g_dyn_view_is_empty_summary - Is view empty? - DESCR : &g_dyn_view_is_empty_descr - The method checks if the view is empty that is, it has zero rows. + SUMMARY : *g_dyn_view_is_empty_summary + DESCR : *g_dyn_view_is_empty_descr CONST : True RETURN: TYPES : bool @@ -63,8 +41,7 @@ CATEGORIES : - g_dyn_view_clear: NAMES : clear SUMMARY : *g_dyn_table_clear_summary - DESCR : &g_dyn_view_clear_descr - This method will remove all rows in a view. + DESCR : *g_dyn_view_clear_descr EXAMPLES: - CODE : ex_cpp_dyn_view_clear DESCR : @@ -130,10 +107,8 @@ CATEGORIES : METHODS: - g_dyn_view_get_source_ndx: NAMES : get_source_ndx - SUMMARY : &g_dyn_view_get_source_ndx_summary - Get source index. - DESCR : &g_dyn_view_get_source_ndx_descr - This method will get the index of the row in the source table. + SUMMARY : *g_dyn_view_get_source_ndx_summary + DESCR : *g_dyn_view_get_source_ndx_descr CONST : True PARAMS: - NAME : row_ndx @@ -355,10 +330,8 @@ CATEGORIES : DESCR : - g_dyn_view_sort: NAMES : sort - SUMMARY : &g_dyn_view_get_sorted_view_summary - Sort the view. - DESCR : &g_dyn_view_get_sorted_view_desc - This method will sort the rows by using values of a given column. + SUMMARY : *g_dyn_view_get_sorted_view_summary + DESCR : *g_dyn_view_get_sorted_view_desc PARAMS: - NAME : column_ndx TYPES : size_t @@ -375,10 +348,8 @@ CATEGORIES : - g_dyn_view_sum_float: - g_dyn_view_sum_double: NAMES : [sum, sum_float, sum_double] - SUMMARY : &g_dyn_view_sum_summary - Calculates the sum. - DESCR : &g_dyn_view_sum_descr - Calculates the sum of a column. + SUMMARY : *g_dyn_view_sum_summary + DESCR : *g_dyn_view_sum_descr CONST : True SIGNATURE: | int64_t sum(size_t column_ndx) const; @@ -398,10 +369,8 @@ CATEGORIES : - g_dyn_view_maximum_float: - g_dyn_view_maximum_double: NAMES : [maximum, maximum_float, maximum_double] - SUMMARY : &g_dyn_view_maximum_summary - Find highest value. - DESCR : &g_dyn_view_maximum_descr - Find the highest value. + SUMMARY : *g_dyn_view_maximum_summary + DESCR : *g_dyn_view_maximum_descr CONST : True SIGNATURE: | int64_t maximum(size_t column_ndx) const; @@ -421,10 +390,8 @@ CATEGORIES : - g_dyn_view_minimum_float: - g_dyn_view_minimum_double: NAMES : [minimum, minimum_float, minimum_double] - SUMMARY : &g_dyn_view_minimum_summary - Find lowest value. - DESCR : &g_dyn_view_minimum_descr - Find the lowest value. + SUMMARY : *g_dyn_view_minimum_summary + DESCR : *g_dyn_view_minimum_descr CONST : True SIGNATURE: | int64_t minimum(size_t column_ndx) const; @@ -445,12 +412,7 @@ CATEGORIES : - g_dyn_view_to_json: NAMES : to_json SUMMARY : *g_dyn_table_to_json_summary - DESCR : &g_dyn_view_to_json_descr - The JavaScript Object Notation (JSON) is useful for - web/mobile applications and serialization. This - method will convert a view and its columns and rows - to a JSON compatible representation. + DESCR : *g_dyn_view_to_json_descr PARAMS: - NAME : out TYPES : std::ostream& @@ -460,11 +422,8 @@ CATEGORIES : DESCR : - g_dyn_view_to_string: NAMES : to_string - SUMMARY : &g_dyn_view_to_string_summary - Convert view to a string. - DESCR : &g_dyn_view_to_string_descr - This method will convert a view and its columns and rows to a format - which is easily read by humans. + SUMMARY : *g_dyn_view_to_string_summary + DESCR : *g_dyn_view_to_string_descr CONST : true PARAMS: - NAME : out diff --git a/doc/ref/data/reference.yaml b/doc/ref/data/reference.yaml index 55ea2ca861..de732735be 100644 --- a/doc/ref/data/reference.yaml +++ b/doc/ref/data/reference.yaml @@ -45,16 +45,16 @@ IMPORTPATH: ../../tightdb/doc/ref_cpp/data CATEGORIES: # list global class-id in order of appearence -- Typed Table: # Category header name - - typed_table # Global Class name. File: 'typed_table_ref.yaml' -# - typed_view - - typed_query -#- Dynamic Table: -# - dyn_table -# - dyn_view -# - dyn_query -- Collection: - - group +#- Typed Table: # Category header name +# - typed_table # Global Class name. File: 'typed_table_ref.yaml' +# - typed_view +# - typed_query +- Dynamic Table: + - dyn_table + - dyn_view + - dyn_query +#- Collection: +# - group # - shared_group #- Helpers: # - mixed diff --git a/doc/ref/data/typed_query_ref.yaml b/doc/ref/data/typed_query_ref.yaml index 5086bb20a3..93cfea3167 100755 --- a/doc/ref/data/typed_query_ref.yaml +++ b/doc/ref/data/typed_query_ref.yaml @@ -107,7 +107,7 @@ CATEGORIES : CODE : ex_cpp_typed_query_greaterThan - g_typed_query_greaterThanOrEqual: - g_typed_query_greaterThanOrEqual_date: - NAMES : [ greater_equal, greater_equal_date ] + NAMES : [greaterEqual, greater_equal_date ] SIGNATURE: | .CName (TableName_Query *)greaterEqual:(int64_t)value .CName (TableName_Query *)greaterEqual:(float)value @@ -309,7 +309,7 @@ CATEGORIES : - DESCR : CODE : ex_cpp_typed_query_findall - g_typed_query_findNext: - NAMES : find_next + NAMES : findNext SIGNATURE: | (size_t)findNext:(size_t)last DESCR : *g_typed_query_find_next_descr diff --git a/doc/ref/data/typed_view_ref.yaml b/doc/ref/data/typed_view_ref.yaml index 9523e3ebae..93f42dbb2f 100755 --- a/doc/ref/data/typed_view_ref.yaml +++ b/doc/ref/data/typed_view_ref.yaml @@ -1,31 +1,17 @@ # -# C++ reference documentation for TableView class +# Obj-C reference documentation for TableView class # + +# JJEPSEN delete renamed to remove (agreed with Kristian) +# JJEPSEN removeLast (remove_last) +# JJEPSEN cannot refer to columns with accessors (this is possible in c++ on a TableName::View using column().*) +# JJEPSEN to_json, to_string +# JJEPSEN c++ reference documentation note : get/set should be replaced with operator overloading ID : class_typed_tableview TITLE : TableView (typed) -SUMMARY : &g_typed_view_intro_summary - The TableView class. -DESCR : &g_typed_view_intro_descr - > - Queries and searches can return TableView - objects, which works as virtual tables containing just - the matched rows. You can interact with a - TableView just like a regular table. - - A {@link class_typed_tableview} is implicitely linked to a - {@link class_typed_table}. All changes to the view will - propagate to the original (or source) table. This includes - operations like updating values and deleting rows. - - Notice that this does not imply that it will work the - opposite direction. Any change that adds or removes rows - in the original table will invalidate the view, and you - will have an inconsistent view of the table. This might - lead to a serious data corruption. - - It is possible to create two or more views for the table as - long as you do not change the original table. +SUMMARY : *g_typed_view_intro_summary +DESCR : *g_typed_view_intro_descr SEE : EXAMPLES : - DESCR: @@ -35,9 +21,10 @@ CATEGORIES : - State: METHODS: - g_typed_view_size: - NAMES : size + NAMES : count SUMMARY : *g_typed_table_size_summary - DESCR : *g_typed_table_size_descr + DESCR : *g_typed_table_size_descr + SIGNATURE: (size_t)count CONST : True RETURN: TYPES : size_t @@ -46,11 +33,10 @@ CATEGORIES : - CODE : ex_cpp_typed_view_size DESCR : - g_typed_view_is_empty: - NAMES : is_empty - SUMMARY : &g_typed_view_is_empty_summary - Is view empty. - DESCR : &g_typed_view_is_empty_descr - This method checks if the view is empty that is, it has zero rows. + NAMES : isEmpty + SUMMARY : *g_typed_view_is_empty_summary + DESCR : *g_typed_view_is_empty_descr + SIGNATURE: (BOOL)isEmpty CONST : True RETURN: TYPES : bool @@ -62,23 +48,22 @@ CATEGORIES : METHODS: - g_typed_view_clear: NAMES : clear - SUMMARY : *g_typed_table_clear_summary - DESCR : &g_typed_view_clear_descr - This method will remove all rows in a view. + SUMMARY : *g_typed_table_clear_summary + SIGNATURE: (void)clear + DESCR : *g_typed_view_clear_descr EXAMPLES: - CODE : ex_cpp_typed_view_clear DESCR : - Rows: METHODS: - g_typed_view_get_source_ndx: - NAMES : get_source_ndx - SUMMARY : &g_typed_view_get_source_ndx_summary - Get source index. - DESCR : &g_typed_view_get_source_ndx_descr - This method will get the index of the row in the source table. + NAMES : getSourceNdx + SUMMARY : *g_typed_view_get_source_ndx_summary + DESCR : *g_typed_view_get_source_ndx_descr + SIGNATURE: (size_t)getSourceNdx:(size_t)ndx CONST : True PARAMS: - - NAME : row_ndx + - NAME : ndx TYPES : size_t DESCR : The row index in the view. RETURN: @@ -91,100 +76,26 @@ CATEGORIES : NAMES : remove SUMMARY : *g_typed_table_remove_row_summary DESCR : *g_typed_table_remove_row_descr - SIGNATURE: void remove(size_t row_ndx); + SIGNATURE: (void)remove:(size_t)ndx PARAMS: - - NAME : row_ndx + - NAME : ndx TYPES : size_t DESCR : Position of row to delete. EXAMPLES: - CODE : ex_cpp_typed_table_remove DESCR : - g_typed_view_remove_last_row: - NAMES : remove_last + NAMES : removeLast (not yet implemented) SUMMARY : *g_typed_table_remove_last_row_summary DESCR : *g_typed_table_remove_last_row_descr SIGNATURE: void remove_last(); EXAMPLES: - CODE : ex_cpp_typed_table_remove_last_row DESCR : -- Values: - METHODS: - - g_typed_view_get_bool: - - g_typed_view_get_float: - - g_typed_view_get_double: - - g_typed_view_get_int: - - g_typed_view_get_date: - - g_typed_view_get_string: - - g_typed_view_get_binary: - - g_typed_view_get_mixed: - - g_typed_view_get_mixed_type: - - g_typed_view_get_subtable: - - g_typed_view_get_subtable_const: - NAMES : get_* - SUMMARY : Get value. - DESCR : This method retrieves the value of a cell. - SIGNATURE: | - bool get_bool(size_t row_ndx) const; - int64_t get_int(size_t row_ndx) const; - float get_float(size_t row_ndx) const; - double get_double(size_t row_ndx) const; - time_t get_date(size_t row_ndx) const; - const char* get_string(size_t row_ndx) const; - BinaryData get_binary(size_t row_ndx) const; - Mixed get_mixed(size_t row_ndx) const; - DataType get_mixed_type(size_t row_ndx) const - TableRef get_subtable(size_t row_ndx); - ConstTableRef get_subtable(size_t row_ndx) const; - CONST : True - PARAMS: - - NAME : row_ndx - TYPES : size_t - DESCR : The row index. - RETURN: - TYPES : [bool, int64_t, float, double, time_t, const char*, BinaryData, Mixed, DataType, TableRef, ConstTableRef] - DESCR : The value. - EXAMPLES: - - CODE : ex_cpp_typed_view_get_xxx - DESCR : - - g_typed_view_set_bool: - - g_typed_view_set_int: - - g_typed_view_set_float: - - g_typed_view_set_double: - - g_typed_view_set_enum: - - g_typed_view_set_date: - - g_typed_view_set_string: - - g_typed_view_set_binary: - - g_typed_view_set_mixed: - NAMES : set_* - SUMMARY : Set value. - DESCR : This method sets the value of a cell. - SIGNATURE: | - void set_bool(size_t row_ndx, bool value); - void set_int(size_t row_ndx, int64_t value); - void set_float(size_t row_ndx, float value); - void set_double(size_t row_ndx, double value); - void set_enum(size_t row_ndx, EnumType value); - void set_date(size_t row_ndx, time_t value); - void set_string(size_t row_ndx, const char* value); - void set_binary(size_t row_ndx, const char* value, size_t len); - void set_mixed(size_t row_ndx, Mixed value); - PARAMS: - - NAME : row_ndx - TYPES : size_t - DESCR : The row index. - - NAME : value - TYPES : [bool, int64_t, float, double, time_t, const char*, Mixed] - DESCR : The value. - - NAME : len - TYPES : size_t - DESCR : Size in bytes of binary value. - EXAMPLES: - - CODE : ex_cpp_typed_view_set_xxx - DESCR : - Sub-tables: METHODS: - g_typed_view_get_subtable_size: - NAMES : get_subtable_size + NAMES : getSubtableSize (not yet implemented) SUMMARY : Get size of subtable. DESCR : This method gets the size (number of rows) of a subtable. CONST : true @@ -199,7 +110,7 @@ CATEGORIES : - CODE : ex_cpp_typed_view_get_subtable DESCR : - g_typed_view_clear_subtable: - NAMES : clear_subtable + NAMES : clearSubtable (not yet implemented) SUMMARY : Remove rows in subtable. DESCR : This method removes all rows in a subtable. PARAMS: @@ -217,7 +128,7 @@ CATEGORIES : - g_typed_view_find_first_double: - g_typed_view_find_first_date: - g_typed_view_find_first_string: - NAMES : find_first_* + NAMES : findNext* (not yet implemented) SUMMARY : Find first match row. DESCR : This method finds the first matching row. SIGNATURE: | @@ -250,7 +161,7 @@ CATEGORIES : - g_typed_view_find_all_double_double: - g_typed_view_find_all_date_const: - g_typed_view_find_all_string_const: - NAMES : find_all_* + NAMES : findAll* (not yet implemented) SUMMARY : Find all matching rows. DESCR : > This method finds all matching rows and returns a new {@link class_typed_tableview} object. Beware, @@ -281,11 +192,9 @@ CATEGORIES : - CODE : ex_cpp_typed_view_find_all_xxx DESCR : - g_typed_view_sort: - NAMES : sort - SUMMARY : &g_typed_view_get_sorted_view_summary - Sort the view. - DESCR : &g_typed_view_get_sorted_view_desc - This method will sort the rows by using values of a given column. + NAMES : sort (not yet implemented) + SUMMARY : *g_typed_view_get_sorted_view_summary + DESCR : *g_typed_view_get_sorted_view_desc PARAMS: - NAME : ascending TYPES : bool @@ -298,11 +207,9 @@ CATEGORIES : - g_typed_view_sum: - g_typed_view_sum_float: - g_typed_view_sum_double: - NAMES : [sum, sum_float, sum_double] - SUMMARY : &g_typed_view_sum_summary - Calculates the sum. - DESCR : &g_typed_view_sum_descr - Calculates the sum of a column. + NAMES : [sum (not yet implemented), sum_float, sum_double] + SUMMARY : *g_typed_view_sum_summary + DESCR : *g_typed_view_sum_descr CONST : True SIGNATURE: | int64_t sum() const; @@ -317,11 +224,9 @@ CATEGORIES : - g_typed_view_maximum: - g_typed_view_maximum_float: - g_typed_view_maximum_double: - NAMES : [maximum, maximum_float, maximum_double] - SUMMARY : &g_typed_view_maximum_summary - Find highest value. - DESCR : &g_typed_view_maximum_descr - Find the highest value. + NAMES : [maximum (not yet implemented), maximum_float, maximum_double] + SUMMARY : *g_typed_view_maximum_summary + DESCR : *g_typed_view_maximum_descr CONST : True SIGNATURE: | int64_t maximum(size_t column_ndx) const; @@ -336,11 +241,9 @@ CATEGORIES : - g_typed_view_minimum: - g_typed_view_minimum_float: - g_typed_view_minimum_double: - NAMES : [minimum, minimum_float, minimum_double] - SUMMARY : &g_typed_view_minimum_summary - Find lowest value. - DESCR : &g_typed_view_minimum_descr - Find the lowest value. + NAMES : [minimum (not yet implemented), minimum_float, minimum_double] + SUMMARY : *g_typed_view_minimum_summary + DESCR : *g_typed_view_minimum_descr CONST : True SIGNATURE: | int64_t minimum() const; @@ -355,11 +258,9 @@ CATEGORIES : - g_typed_view_average: - g_typed_view_average_float: - g_typed_view_average_double: - NAMES : [average, average_float, average_double] - SUMMARY : &g_typed_view_average_summary - Find lowest value. - DESCR : &g_typed_view_average_descr - Find the lowest value. + NAMES : [average (not yet implemented), average_float, average_double] + SUMMARY : *g_typed_view_average_summary + DESCR : *g_typed_view_average_descr CONST : True SIGNATURE: | double average() const; @@ -374,15 +275,9 @@ CATEGORIES : - Dump: METHODS: - g_typed_view_to_json: - NAMES : to_json - SUMMARY : &g_typed_view_to_json_summary - Convert view to JSON. - DESCR : &g_typed_view_to_json_descr - The JavaScript Object Notation (JSON) is useful for - web/mobile applications and serialization. This - method will convert a view and its columns and rows - to a JSON compatible representation. + NAMES : toJSON (not yet implemented) + SUMMARY : *g_typed_view_to_json_summary + DESCR : *g_typed_view_to_json_descr PARAMS: - NAME : out TYPES : std::ostream& @@ -391,12 +286,9 @@ CATEGORIES : - CODE : ex_cpp_typed_view_to_json DESCR : - g_typed_view_to_string: - NAMES : to_string - SUMMARY : &g_typed_view_to_string_summary - Convert view to a string. - DESCR : &g_typed_view_to_string_descr - This method will convert a view and its columns and rows to a format - which is easily read by humans. + NAMES : toString (not yet implemented) + SUMMARY : *g_typed_view_to_string_summary + DESCR : *g_typed_view_to_string_descr CONST : true PARAMS: - NAME : out From 8c4ebef162d75cab7ed303fc624e7bc681bb613e Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Wed, 17 Apr 2013 17:52:05 +0200 Subject: [PATCH 6/9] Updates in doc/ref/data --- doc/ref/data/dyn_query_ref.yaml | 116 ++++++++-------- doc/ref/data/dyn_table_ref.yaml | 236 ++++++++++++++------------------ doc/ref/data/dyn_view_ref.yaml | 77 +++++------ 3 files changed, 197 insertions(+), 232 deletions(-) diff --git a/doc/ref/data/dyn_query_ref.yaml b/doc/ref/data/dyn_query_ref.yaml index 30eb649d07..3b16dd8f1a 100755 --- a/doc/ref/data/dyn_query_ref.yaml +++ b/doc/ref/data/dyn_query_ref.yaml @@ -1,5 +1,5 @@ # -# C++ reference documentation for Query class +# Obj-C reference documentation for Query class # ## TODO: Describe limitations about using correct versions of the methods on the right column_types. @@ -25,25 +25,25 @@ CATEGORIES : - g_dyn_query_equals_string: - g_dyn_query_equals_date: - g_dyn_query_equals_binary: - NAMES : [ equal, equal_date, equal_binary ] + NAMES : [ equal (not implemented for all types), equal_date, equal_binary ] SIGNATURE: | - Query& equal(size_t column_ndx, bool value); - Query& equal(size_t column_ndx, int64_t value); - Query& equal(size_t column_ndx, float value); - Query& equal(size_t column_ndx, double value); - Query& equal(size_t column_ndx, const char* value, bool case_sensitive=true); - Query& equal(size_t column_ndx, BinaryData value); - Query& equal_date(size_t column_ndx, time_t value); + (TightdbQuery *)equal:(BOOL)value + (TightdbQuery *)equal:(int64_t)value + (TightdbQuery *)equal:(float)value + (TightdbQuery *)equal:(double)value + (TightdbQuery *)equal:(NSString *)value + (TightdbQuery *)equal:(NSString *)value caseSensitive:(BOOL)caseSensitive + (TightdbQuery *)equal:(time_t)value SUMMARY : *g_dyn_query_equals_summary DESCR : *g_dyn_query_equals_descr PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value TYPES : [bool, int64_t, float, double, const char*, BinaryData, time_t] DESCR : The value. - - NAME : case_sensitive + - NAME : caseSensitive TYPES : bool DESCR : *g_dyn_query_case_sensitive_descr RETURN: @@ -57,13 +57,14 @@ CATEGORIES : - g_dyn_query_notEquals_string: - g_dyn_query_notEquals_date: - g_dyn_query_notEquals_binary: - NAMES : [ not_equal, not_equal, not_equal_binary ] + NAMES : [ notEqual (not implemented for all types), not_equal, not_equal_binary ] SIGNATURE: | - Query& not_equal(size_t column_ndx, int64_t value); - Query& not_equal(size_t column_ndx, float value); - Query& not_equal(size_t column_ndx, double value); - Query& not_equal(size_t column_ndx, const char* value, bool case_sensitive=true); - Query& not_equal_date(size_t column_ndx, time_t value); + (TightdbQuery *)notEqual:(int64_t)value + (TightdbQuery *)notEqual:(float)value + (TightdbQuery *)notEqual:(double)value + (TightdbQuery *)notEqual:(NSString *)value + (TightdbQuery *)notEqual:(NSString *)value caseSensitive:(BOOL)caseSensitive + (TightdbQuery *)notEqual:(time_t)value # Query& not_equal(size_t column_ndx, bool value); # Query& not_equal_binary(size_t column_ndx, const char* data, size_t size); SUMMARY : *g_dyn_query_notEquals_summary @@ -88,14 +89,14 @@ CATEGORIES : - g_dyn_query_greaterThan_date: NAMES : [ greater, greater_date ] SIGNATURE: | - Query& greater(size_t column_ndx, int64_t value); - Query& greater(size_t column_ndx, float value); - Query& greater(size_t column_ndx, double value); - Query& greater_date(size_t column_ndx, time_t value); + (TightdbQuery *)greater:(int64_t)value + (TightdbQuery *)greater:(float)value + (TightdbQuery *)greater:(double)value + (TightdbQuery *)greater:(time_t)value SUMMARY : *g_dyn_query_greaterThan_summary DESCR : *g_dyn_query_greaterThan_descr PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value @@ -109,16 +110,16 @@ CATEGORIES : CODE : ex_cpp_dyn_query_greaterThan - g_dyn_query_greaterThanOrEqual: - g_dyn_query_greaterThanOrEqual_date: - NAMES : [ greater_equal, greater_equal_date ] + NAMES : [ greaterEqual, greater_equal_date ] SIGNATURE: | - Query& greater_equal(size_t column_ndx, int64_t value); - Query& greater_equal(size_t column_ndx, float value); - Query& greater_equal(size_t column_ndx, double value); - Query& greater_equal_date(size_t column_ndx, time_t value); + (TightdbQuery *)greaterEqual:(int64_t)value + (TightdbQuery *)greaterEqual:(float)value + (TightdbQuery *)greaterEqual:(double)value + (TightdbQuery *)greaterEqual:(time_t)value SUMMARY : *g_dyn_query_greaterThanOrEqual_summary DESCR : *g_dyn_query_greaterThanOrEqual_descr PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value @@ -134,14 +135,14 @@ CATEGORIES : - g_dyn_query_lessThan_date: NAMES : [less, less_date] SIGNATURE: | - Query& less(size_t column_ndx, int64_t value); - Query& less(size_t column_ndx, float value); - Query& less(size_t column_ndx, double value); - Query& less_date(size_t column_ndx, time_t value); + (TightdbQuery *)less:(int64_t)value + (TightdbQuery *)less:(float)value + (TightdbQuery *)less:(double)value + (TightdbQuery *)less:(time_t)value SUMMARY : *g_dyn_query_lessThan_summary DESCR : *g_dyn_query_lessThan_descr PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value @@ -155,16 +156,16 @@ CATEGORIES : CODE : ex_cpp_dyn_query_lessThan - g_dyn_query_lessThanOrEqual: - g_dyn_query_lessThanOrEqual_date: - NAMES : [less_equal, less_equal_date] + NAMES : [lessEqual, less_equal_date] SIGNATURE: | - Query& less_equal(size_t column_ndx, int64_t value); - Query& less_equal(size_t column_ndx, int64_t value); - Query& less_equal(size_t column_ndx, int64_t value); - Query& less_equal_date(size_t column_ndx, time_t value); + (TightdbQuery *)lessEqual:(int64_t)value + (TightdbQuery *)lessEqual:(float)value + (TightdbQuery *)lessEqual:(double)value + (TightdbQuery *)lessEqual:(time_t)value SUMMARY : *g_dyn_query_lessThanOrEqual_summary DESCR : *g_dyn_query_lessThanOrEqual_descr PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value @@ -180,14 +181,14 @@ CATEGORIES : - g_dyn_query_between_date: NAMES : [between, between_date] SIGNATURE: | - Query& between(size_t column_ndx, int64_t from, int64_t to); - Query& between(size_t column_ndx, float from, float to); - Query& between(size_t column_ndx, double from, double to); - Query& between_date(size_t column_ndx, time_t from, time_t to); + (TightdbQuery *)between:(int64_t)from to:(int64_t)to + (TightdbQuery *)between:(float)from to:(float)to + (TightdbQuery *)between:(double)from to:(double)to + (TightdbQuery *)between:(time_t)from to:(time_t)to DESCR : *g_dyn_query_between_descr SUMMARY : *g_dyn_query_between_summary PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : from @@ -204,20 +205,20 @@ CATEGORIES : CODE : ex_cpp_dyn_query_between - g_dyn_query_startsWith: # - g_dyn_query_startsWith_binary: - NAMES : [begins_with] #, begins_with_binary] + NAMES : [beginsWith] #, begins_with_binary] SIGNATURE: | - Query& begins_with(size_t column_ndx, const char* value, bool case_sensitive=true); -# Query& begins_with_binary(size_t column_ndx, const char* data, size_t size); + (TightdbQuery *)beginsWith:(NSString *)value caseSensitive:(BOOL)caseSensitive +# (TightdbQuery *)beginsWith:(NSString *)value DESCR : *g_dyn_query_startsWith_descr SUMMARY : *g_dyn_query_startsWith_summary PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value TYPES : const char* DESCR : The value. - - NAME : case_sensitive + - NAME : caseSensitive TYPES : bool DESCR : *g_dyn_query_case_sensitive_descr RETURN: @@ -228,20 +229,20 @@ CATEGORIES : CODE : ex_cpp_dyn_query_startsWith - g_dyn_query_endsWith: # - g_dyn_query_endsWith_binary: - NAMES : [ends_with] #, ends_with_binary] + NAMES : [endsWith] #, ends_with_binary] SIGNATURE: | - Query& ends_with(size_t column_ndx, const char* value, bool case_sensitive=true); -# Query& ends_with_binary(size_t column_ndx, const char* data, size_t size); + (TightdbQuery *)endsWith:(NSString *)value caseSensitive:(BOOL)caseSensitive +# (TightdbQuery *)endsWith:(NSString *)value DESCR : *g_dyn_query_endsWith_descr SUMMARY : *g_dyn_query_endsWith_summary PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value TYPES : const char* DESCR : The value. - - NAME : case_sensitive + - NAME : caseSensitive TYPES : bool DESCR : *g_dyn_query_case_sensitive_descr RETURN: @@ -254,18 +255,19 @@ CATEGORIES : # - g_dyn_query_contains_binary: NAMES : [contains] #, contains_binary] SIGNATURE: | - Query& contains(size_t column_ndx, const char* value, bool case_sensitive=true); + (TightdbQuery *)contains:(NSString *)value caseSensitive:(BOOL)caseSensitive + (TightdbQuery *)contains:(NSString *)value # Query& contains_binary(size_t column_ndx, const char* data, size_t size); DESCR : *g_dyn_query_contains_descr SUMMARY : *g_dyn_query_contains_summary PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : value TYPES : const char* DESCR : The value - - NAME : case_sensitive + - NAME : caseSensitive TYPES : bool DESCR : *g_dyn_query_case_sensitive_descr RETURN: diff --git a/doc/ref/data/dyn_table_ref.yaml b/doc/ref/data/dyn_table_ref.yaml index 816a726e40..f26515836f 100755 --- a/doc/ref/data/dyn_table_ref.yaml +++ b/doc/ref/data/dyn_table_ref.yaml @@ -1,6 +1,12 @@ # # Obj-C reference documentation for Table class # + +# INCONSISTENCY index* (row_ndx) +# INCONSISTENCY getTable & insertSubtable +# NAMING deleteRow -> remove, get -> getInt, set -> setInt (and ndx->row_ndx) +# MISSING lookup +# MISSING where (only possible in typed tables) ID : class_dyn_table TITLE : Table (dynamic) @@ -206,10 +212,10 @@ CATEGORIES : (void)insertSubtable:(size_t)col_ndx ndx:(size_t)row_ndx (void)insertDone PARAMS: - - NAME : col_ndx + - NAME : ndx, row_ndx TYPES : size_t DESCR : The column index. - - NAME : row_ndx + - NAME : ndx TYPES : size_t DESCR : The row index. - NAME : value @@ -227,19 +233,19 @@ CATEGORIES : NAMES : remove SUMMARY : *g_dyn_table_remove_row_summary DESCR : *g_dyn_table_remove_row_descr - SIGNATURE: void remove(size_t row_ndx); + SIGNATURE: (void)remove:(size_t)ndx PARAMS: - - NAME : row_ndx + - NAME : ndx TYPES : size_t DESCR : Position of the row to delete. EXAMPLES: - CODE : ex_cpp_dyn_table_remove DESCR : - - g_dyn_table_remove_last_row: - NAMES : remove_last + - g_dyn_table_remove_last: + NAMES : removeLast SUMMARY : *g_dyn_table_remove_last_row_summary DESCR : *g_dyn_table_remove_last_row_descr - SIGNATURE: void remove_last(); + SIGNATURE: (void)removeLast EXAMPLES: - CODE : ex_cpp_dyn_table_remove_last_row DESCR : @@ -254,32 +260,32 @@ CATEGORIES : - g_dyn_table_get_mixed_type: - g_dyn_table_get_subtable: - g_dyn_table_get_subtable_const: - NAMES : get_* + NAMES : get* SUMMARY : *g_dyn_table_get_xxx_summary DESCR : *g_dyn_table_get_xxx_descr SIGNATURE: | - bool get_bool(size_t column_ndx, size_t row_ndx) const; - int64_t get_int(size_t column_ndx, size_t row_ndx) const; - time_t get_date(size_t column_ndx, size_t row_ndx) const; - float get_float(size_t column_ndx, size_t row_ndx) const; - double get_double(size_t column_ndx, size_t row_ndx) const; - const char* get_string(size_t column_ndx, size_t row_ndx) const; - BinaryData get_binary(size_t column_ndx, size_t row_ndx) const; - Mixed get_mixed(size_t column_ndx, size_t row_ndx) const; - DataType get_mixed_type(size_t column_ndx, size_t row_ndx) const + (BOOL)getBool:(size_t)col_ndx ndx:(size_t)ndx + (int64_t)get:(size_t)col_ndx ndx:(size_t)ndx + (time_t)getDate:(size_t)col_ndx ndx:(size_t)ndx + (float)getFloat:(size_t)col_ndx ndx:(size_t)ndx + (double)getDouble:(size_t)col_ndx ndx:(size_t)ndx + (NSString *)getString:(size_t)col_ndx ndx:(size_t)ndx + (TightdbBinary *)getBinary:(size_t)col_ndx ndx:(size_t)ndx + (TightdbMixed *)getMixed:(size_t)col_ndx ndx:(size_t)row_ndx + (TightdbType)getMixedType:(size_t)col_ndx ndx:(size_t)row_ndx - TableRef get_subtable(size_t column_ndx, size_t row_ndx); - ConstTableRef get_subtable(size_t column_ndx, size_t row_ndx) const; + (TightdbTable *)getSubtable:(size_t)col_ndx ndx:(size_t)ndx + (id)getSubtable:(size_t)col_ndx ndx:(size_t)ndx withClass:(__unsafe_unretained Class)classObj CONST : True PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : The column index. - NAME : row_ndx TYPES : size_t DESCR : The row index. RETURN: - TYPES : [bool, int64_t, float, double, time_t, const char*, BinaryData, Mixed, DataType] + TYPES : [bool, int64_t, float, double, time_t, NSString, TightdbBinary, TightdbMixed, TightdbType, TightdbTable] DESCR : The value. EXAMPLES: - CODE : ex_cpp_dyn_table_get_xxx @@ -291,21 +297,22 @@ CATEGORIES : - g_dyn_table_set_string: - g_dyn_table_set_binary: - g_dyn_table_set_mixed: - NAMES : set_* + NAMES : set* SUMMARY : *g_dyn_table_set_xxx_summary DESCR : *g_dyn_table_set_xxx_descr SIGNATURE: | - void set_bool(size_t column_ndx, size_t row_ndx, bool value); - void set_int(size_t column_ndx, size_t row_ndx, int64_t value); - void set_float(size_t column_ndx, size_t row_ndx, float value); - void set_double(size_t column_ndx, size_t row_ndx, double value); - template void set_enum(size_t column_ndx, size_t row_ndx, E value); - void set_date(size_t column_ndx, size_t row_ndx, time_t value); - void set_string(size_t column_ndx, size_t row_ndx, const char* value); - void set_binary(size_t column_ndx, size_t row_ndx, const char* value, size_t len); - void set_mixed(size_t column_ndx, size_t row_ndx, Mixed value); + (void)setBool:(size_t)col_ndx ndx:(size_t)ndx value:(BOOL)value + (void)set:(size_t)col_ndx ndx:(size_t)ndx value:(int64_t)value + (void)setFloat:(size_t)col_ndx ndx:(size_t)ndx value:(float)value + (void)setDouble:(size_t)col_ndx ndx:(size_t)ndx value:(double)value + (void)setDate:(size_t)col_ndx ndx:(size_t)ndx value:(time_t)value + (void)setString:(size_t)col_ndx ndx:(size_t)ndx value:(NSString *)value + (void)setBinary:(size_t)col_ndx ndx:(size_t)ndx value:(TightdbBinary *)value + (void)setBinary:(size_t)col_ndx ndx:(size_t)ndx data:(const char *)data size:(size_t)size + (void)setMixed:(size_t)col_ndx ndx:(size_t)row_ndx value:(TightdbMixed *)value + PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : The column index. - NAME : row_ndx @@ -314,7 +321,7 @@ CATEGORIES : - NAME : value TYPES : [bool, int64_t, float, double, time_t, const char*, Mixed] DESCR : The value. - - NAME : len + - NAME : size TYPES : size_t DESCR : Size in bytes of binary value. EXAMPLES: @@ -323,13 +330,13 @@ CATEGORIES : - Sub-tables: METHODS: - g_dyn_table_get_subtable_size: - NAMES : get_subtable_size + NAMES : getTableSize SUMMARY : *g_dyn_table_get_subtable_size_summary DESCR : *g_dyn_table_get_subtable_size_descr - SIGNATURE: + SIGNATURE: (size_t)getTableSize:(size_t)col_ndx ndx:(size_t)row_ndx CONST : true PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : The column index. - NAME : row_ndx @@ -342,12 +349,12 @@ CATEGORIES : - CODE : ex_cpp_dyn_table_get_subtable DESCR : - g_dyn_table_clear_subtable: - NAMES : clear_subtable + NAMES : clearSubtable SUMMARY : *g_dyn_table_clear_subtable_summary DESCR : *g_dyn_table_clear_subtable_descr - SIGNATURE: + SIGNATURE: (void)clearSubtable:(size_t)col_ndx ndx:(size_t)row_ndx PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : The column index. - NAME : row_ndx @@ -359,28 +366,25 @@ CATEGORIES : - Indexes: METHODS: - g_dyn_table_set_index: - NAMES : set_index + NAMES : setIndex SUMMARY : *g_dyn_table_set_index_summary DESCR : *g_dyn_table_set_index_descr - SIGNATURE: + SIGNATURE: (void)setIndex:(size_t)col_ndx PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - - NAME : update_spec - TYPES : bool - DESCR : "If true, the table spec will be updated. Default: true." EXAMPLES: - CODE : ex_cpp_dyn_table_set_index DESCR : - g_dyn_table_has_index: - NAMES : has_index + NAMES : hasIndex SUMMARY : *g_dyn_table_has_index_summary DESCR : *g_dyn_table_has_index_descr - SIGNATURE: + SIGNATURE: (BOOL)hasIndex:(size_t)col_ndx CONST : true PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. RETURN: @@ -392,7 +396,7 @@ CATEGORIES : - Searching: METHODS: - g_dyn_table_lookup: - NAMES : lookup + NAMES : lookup (not yet implemented) SUMMARY : *g_dyn_table_lookup_summary DESCR : *g_dyn_table_lookup_descr SIGNATURE: @@ -411,19 +415,21 @@ CATEGORIES : - g_find_first_int: - g_find_first_date: - g_find_first_string: - NAMES : find_first_* + NAMES : find* SUMMARY : Find first matching row. DESCR : The method finds the first occurence of a given value in a column. SIGNATURE: | - size_t find_first_int(size_t column_ndx, int64_t value) const; - size_t find_first_bool(size_t column_ndx, bool value) const; - size_t find_first_date(size_t column_ndx, time_t value) const; - size_t find_first_string(size_t column_ndx, const char* value) const; - size_t find_first_float(size_t column_ndx, float value) const; - size_t find_first_double(size_t column_ndx, double value) const; + (size_t)findInt:(size_t)col_ndx value:(int64_t)value + (size_t)findBool:(size_t)col_ndx value:(BOOL)value + (size_t)findDate:(size_t)col_ndx value:(time_t)value + (size_t)findString:(size_t)col_ndx value:(NSString *)value + (size_t)findFloat:(size_t)col_ndx value:(float)value + (size_t)findDouble:(size_t)col_ndx value:(double)value + (size_t)findBinary:(size_t)col_ndx value:(TightdbBinary *)value + CONST : True PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : The column index. - NAME : value @@ -447,28 +453,16 @@ CATEGORIES : - g_find_all_string_const: - g_find_all_float_const: - g_find_all_double_const: - NAMES : find_all_* + NAMES : findAll* (not implemented for all types yet) SUMMARY : *g_find_all_xxx_summary DESCR : > The method finds all occurences of a given value in a specific column. The rows are returned as a {@link class_dyn_tableview} object. SIGNATURE: | - TableView find_all_int(size_t column_ndx, int64_t value); - TableView find_all_bool(size_t column_ndx, bool value); - TableView find_all_date(size_t column_ndx, time_t value); - TableView find_all_string(size_t column_ndx, const char* value); - TableView find_all_float(size_t column_ndx, float value); - TableView find_all_double(size_t column_ndx, double value); - - ConstTableView find_all_int(size_t column_ndx, int64_t value) const; - ConstTableView find_all_bool(size_t column_ndx, bool value) const; - ConstTableView find_all_date(size_t column_ndx, time_t value) const; - ConstTableView find_all_string(size_t column_ndx, const char* value) const; - ConstTableView find_all_float(size_t column_ndx, float value) const; - ConstTableView find_all_double(size_t column_ndx, double value) const; + (TightdbView *)findAll:(TightdbView *)view column:(size_t)col_ndx value:(int64_t)value PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : The column index. - NAME : value @@ -482,7 +476,7 @@ CATEGORIES : DESCR : - g_dyn_table_get_sorted_view: - g_dyn_table_get_sorted_view_const: - NAMES : get_sorted_view + NAMES : getSortedView (not yet implemented) SUMMARY : *g_dyn_table_get_sorted_view_summary DESCR : *g_dyn_table_get_sorted_view_desc SIGNATURE: | @@ -503,7 +497,7 @@ CATEGORIES : DESCR : - g_dyn_table_distinct: - g_dyn_table_distinct_const: - NAMES : distinct + NAMES : distinct (not yet implemented) SUMMARY : *g_dyn_table_distinct_summary DESCR : *g_dyn_table_distinct_desc SIGNATURE: | @@ -521,7 +515,7 @@ CATEGORIES : DESCR : - g_dyn_table_where: - g_dyn_table_where_const: - NAMES : [where, where] + NAMES : [where (not yet implemented), where] SIGNATURE: | Query where() const Query where() const @@ -535,14 +529,19 @@ CATEGORIES : CODE : ex_cpp_dyn_table_where - Aggregates: METHODS: - - g_dyn_table_count_int: - NAMES : count_int + - g_dyn_table_count_int: + - g_dyn_table_count_string: + NAMES : count* SUMMARY : *g_dyn_table_count_summary DESCR : *g_dyn_table_count_descr - SIGNATURE: + SIGNATURE: | + (size_t)countInt:(size_t)col_ndx target:(int64_t)target + (size_t)countFloat:(size_t)col_ndx target:(float)target + (size_t)countDouble:(size_t)col_ndx target:(double)target + (size_t)countString:(size_t)col_ndx target:(NSString *)target CONST : True PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. - NAME : target @@ -554,37 +553,19 @@ CATEGORIES : EXAMPLES: - CODE : ex_cpp_dyn_table_count DESCR : - - g_dyn_table_count_string: - NAMES : count_string - SUMMARY : *g_dyn_table_count_string_summary - DESCR : *g_dyn_table_count_string_descr - CONST : True - PARAMS: - - NAME : column_ndx - TYPES : size_t - DESCR : Column index. - - NAME : target - TYPES : const char* - DESCR : The value. - RETURN: - TYPES : size_t - DESCR : The number of rows. - EXAMPLES: - - CODE : ex_cpp_dyn_table_count_string - DESCR : - g_dyn_table_sum: - g_dyn_table_sum_float: - g_dyn_table_sum_double: - NAMES : [sum, sum_float, sum_double] + NAMES : [sumInt, sumFloat, sumDouble] SUMMARY : *g_dyn_table_sum_summary DESCR : *g_dyn_table_sum_descr SIGNATURE: | - int64_t sum(size_t column_ndx) const; - double sum_float(size_t column_ndx) const; - double sum_double(size_t column_ndx) const; + (int64_t)sumInt:(size_t)col_ndx + (double)sumFloat:(size_t)col_ndx + (double)sumDouble:(size_t)col_ndx CONST : True PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. RETURN: @@ -596,16 +577,16 @@ CATEGORIES : - g_dyn_table_maximum: - g_dyn_table_maximum_float: - g_dyn_table_maximum_double: - NAMES : [maximum, maximum_float, maximum_double] + NAMES : [max*, maxFloat, maximum_double] SUMMARY : *g_dyn_table_maximum_summary DESCR : *g_dyn_table_maximum_descr SIGNATURE: | - int64_t maximum(size_t column_ndx) const; - float maximum_float(size_t column_ndx) const; - double maximum_double(size_t column_ndx) const; + (int64_t)maxInt:(size_t)col_ndx + (float)maxFloat:(size_t)col_ndx + (double)maxDouble:(size_t)col_ndx CONST : True PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. RETURN: @@ -617,16 +598,16 @@ CATEGORIES : - g_dyn_table_minimum: - g_dyn_table_minimum_float: - g_dyn_table_minimum_double: - NAMES : [minimum, minimum_float, minimum_double] + NAMES : [min*, minimum_float, minimum_double] SUMMARY : *g_dyn_table_minimum_summary DESCR : *g_dyn_table_minimum_descr CONST : True SIGNATURE: | - int64_t minimum(size_t column_ndx) const; - float minimum_float(size_t column_ndx) const; - double minimum_double(size_t column_ndx) const; + (int64_t)minInt:(size_t)col_ndx + (float)minFloat:(size_t)col_ndx + (double)minDouble:(size_t)col_ndx PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. RETURN: @@ -638,16 +619,16 @@ CATEGORIES : - g_dyn_table_average: - g_dyn_table_average_float: - g_dyn_table_average_double: - NAMES : [average, average_float, average_double] + NAMES : [avg*, average_float, average_double] SUMMARY : *g_dyn_table_average_summary DESCR : *g_dyn_table_average_descr CONST : True SIGNATURE: | - double average(size_t column_ndx) const; - double average_float(size_t column_ndx) const; - double average_double(size_t column_ndx) const; + (double)avgInt:(size_t)col_ndx + (double)avgFloat:(size_t)col_ndx + (double)avgDouble:(size_t)col_ndx PARAMS: - - NAME : column_ndx + - NAME : col_ndx TYPES : size_t DESCR : Column index. RETURN: @@ -659,7 +640,7 @@ CATEGORIES : - Dump: METHODS: - g_dyn_table_to_json: - NAMES : to_json + NAMES : toJSON (not yet implemented) SUMMARY : *g_dyn_table_to_json_summary DESCR : *g_dyn_table_to_json_descr PARAMS: @@ -670,7 +651,7 @@ CATEGORIES : - CODE : ex_cpp_dyn_table_to_json DESCR : - g_dyn_table_to_string: - NAMES : to_string + NAMES : toString (not yet implemented) SUMMARY : *g_dyn_table_to_string_summary DESCR : *g_dyn_table_to_string_descr CONST : true @@ -683,19 +664,4 @@ CATEGORIES : DESCR : "The number of rows to convert. Default: 500." EXAMPLES: - CODE : ex_cpp_dyn_table_to_string - DESCR : - - g_dyn_table_row_to_string: - NAMES : to_string - SUMMARY : *g_dyn_table_row_to_string_summary - DESCR : *g_dyn_table_row_to_string_descr - CONST : true - PARAMS: - - NAME : row_ndx - TYPES : size_t - DESCR : The row index. - - NAME : out - TYPES : std::ostream& - DESCR : Output stream. - EXAMPLES: - - CODE : ex_cpp_dyn_table_to_string - DESCR : + DESCR : \ No newline at end of file diff --git a/doc/ref/data/dyn_view_ref.yaml b/doc/ref/data/dyn_view_ref.yaml index 792acfb250..89ce8d204e 100755 --- a/doc/ref/data/dyn_view_ref.yaml +++ b/doc/ref/data/dyn_view_ref.yaml @@ -15,10 +15,11 @@ CATEGORIES : - State: METHODS: - g_dyn_view_size: - NAMES : size + NAMES : count SUMMARY : *g_dyn_table_size_summary DESCR : *g_dyn_table_size_descr - CONST : True + CONST : True + SIGNATURE: (size_t)count RETURN: TYPES : size_t DESCR : The number of rows. @@ -26,9 +27,10 @@ CATEGORIES : - CODE : ex_cpp_dyn_view_size DESCR : - g_dyn_view_is_empty: - NAMES : is_empty + NAMES : isEmpty SUMMARY : *g_dyn_view_is_empty_summary - DESCR : *g_dyn_view_is_empty_descr + DESCR : *g_dyn_view_is_empty_descr + SIGNATURE: (BOOL)isEmpty CONST : True RETURN: TYPES : bool @@ -41,14 +43,15 @@ CATEGORIES : - g_dyn_view_clear: NAMES : clear SUMMARY : *g_dyn_table_clear_summary - DESCR : *g_dyn_view_clear_descr + DESCR : *g_dyn_view_clear_descr + SIGNATURE: (void)clear EXAMPLES: - CODE : ex_cpp_dyn_view_clear DESCR : - Columns: METHODS: - g_dyn_view_get_column_count: - NAMES : get_column_count + NAMES : getColumnCount (not yet implemented) SUMMARY : *g_dyn_table_get_column_count_summary DESCR : *g_dyn_table_get_column_count_descr CONST : True @@ -59,7 +62,7 @@ CATEGORIES : - CODE : ex_cpp_dyn_view_get_column_count DESCR : - g_dyn_view_get_column_name: - NAMES : get_column_name + NAMES : getColumnName (not yet implemented) SUMMARY : *g_dyn_table_get_column_name_summary DESCR : *g_dyn_table_get_column_name_descr CONST : True @@ -74,7 +77,7 @@ CATEGORIES : - CODE : ex_cpp_dyn_view_get_column_name DESCR : - g_dyn_view_get_column_index: - NAMES : get_column_index + NAMES : getColumnIndex (not yet implemented) SUMMARY : *g_dyn_table_get_column_index_summary DESCR : *g_dyn_table_get_column_index_descr CONST : True @@ -89,7 +92,7 @@ CATEGORIES : - CODE : ex_cpp_dyn_view_get_column_index DESCR : - g_dyn_view_get_column_type: - NAMES : get_column_type + NAMES : getColumnType (not yet implemented) SUMMARY : *g_dyn_table_get_column_type_summary DESCR : *g_dyn_table_get_column_type_descr CONST : True @@ -106,12 +109,13 @@ CATEGORIES : - Rows: METHODS: - g_dyn_view_get_source_ndx: - NAMES : get_source_ndx + NAMES : getSourceNdx SUMMARY : *g_dyn_view_get_source_ndx_summary - DESCR : *g_dyn_view_get_source_ndx_descr + DESCR : *g_dyn_view_get_source_ndx_descr + SIGNATURE: (size_t)getSourceNdx:(size_t)ndx CONST : True PARAMS: - - NAME : row_ndx + - NAME : ndx TYPES : size_t DESCR : The row index in the view RETURN: @@ -124,19 +128,19 @@ CATEGORIES : NAMES : remove SUMMARY : *g_dyn_table_remove_row_summary DESCR : *g_dyn_table_remove_row_descr - SIGNATURE: void remove(size_t row_ndx); + SIGNATURE: (void)remove:(size_t)ndx; PARAMS: - - NAME : row_ndx + - NAME : ndx TYPES : size_t DESCR : Position of row to delete. EXAMPLES: - CODE : ex_cpp_dyn_table_remove DESCR : - g_dyn_view_remove_last_row: - NAMES : remove_last + NAMES : removeLast SUMMARY : *g_dyn_table_remove_last_row_summary DESCR : *g_dyn_table_remove_last_row_descr - SIGNATURE: void remove_last(); + SIGNATURE: (void)removeLast; EXAMPLES: - CODE : ex_cpp_dyn_table_remove_last_row DESCR : @@ -153,21 +157,14 @@ CATEGORIES : - g_dyn_view_get_mixed_type: - g_dyn_view_get_subtable: - g_dyn_view_get_subtable_const: - NAMES : get_* + NAMES : get* (not yet implemented for all types) SUMMARY : *g_dyn_table_get_xxx_summary DESCR : *g_dyn_table_get_xxx_descr SIGNATURE: | - bool get_bool(size_t column_ndx, size_t row_ndx) const; - int64_t get_int(size_t column_ndx, size_t row_ndx) const; - float get_float(size_t column_ndx, size_t row_ndx) const; - double get_double(size_t column_ndx, size_t row_ndx) const; - time_t get_date(size_t column_ndx, size_t row_ndx) const; - const char* get_string(size_t column_ndx, size_t row_ndx) const; - BinaryData get_binary(size_t column_ndx, size_t row_ndx) const; - Mixed get_mixed(size_t column_ndx, size_t row_ndx) const; - DataType get_mixed_type(size_t column_ndx, size_t row_ndx) const - TableRef get_subtable(size_t column_ndx, size_t row_ndx); - ConstTableRef get_subtable(size_t column_ndx, size_t row_ndx) const; + (BOOL)getBool:(size_t)col_ndx ndx:(size_t)ndx + (int64_t)get:(size_t)col_ndx ndx:(size_t)ndx + (time_t)getDate:(size_t)col_ndx ndx:(size_t)ndx + (NSString *)getString:(size_t)col_ndx ndx:(size_t)ndx CONST : True PARAMS: - NAME : column_ndx @@ -191,7 +188,7 @@ CATEGORIES : - g_dyn_view_set_string: - g_dyn_view_set_binary: - g_dyn_view_set_mixed: - NAMES : set_* + NAMES : set* (not yet implemented) SUMMARY : *g_dyn_table_set_xxx_summary DESCR : *g_dyn_table_set_xxx_descr SIGNATURE: | @@ -223,7 +220,7 @@ CATEGORIES : - Sub-tables: METHODS: - g_dyn_view_get_subtable_size: - NAMES : get_subtable_size + NAMES : get_subtable_size (not yet implemented) SUMMARY : *g_dyn_table_get_subtable_size_summary DESCR : *g_dyn_table_get_subtable_size_descr CONST : true @@ -241,7 +238,7 @@ CATEGORIES : - CODE : ex_cpp_dyn_view_get_subtable DESCR : - g_dyn_view_clear_subtable: - NAMES : clear_subtable + NAMES : clear_subtable (not yet implemented) SUMMARY : *g_dyn_table_clear_subtable_summary DESCR : *g_dyn_table_clear_subtable_descr PARAMS: @@ -262,7 +259,7 @@ CATEGORIES : - g_dyn_view_find_first_double: - g_dyn_view_find_first_date: - g_dyn_view_find_first_string: - NAMES : find_first_* + NAMES : find* (not yet implemented) SUMMARY : *g_find_first_xxx_summary DESCR : *g_find_first_xxx_descr SIGNATURE: | @@ -298,7 +295,7 @@ CATEGORIES : - g_dyn_view_find_all_double_const: - g_dyn_view_find_all_date_const: - g_dyn_view_find_all_string_const: - NAMES : find_all_* + NAMES : findAll* (not yet implemented) SUMMARY : *g_find_all_xxx_summary DESCR : *g_find_all_xxx_descr SIGNATURE: | @@ -307,7 +304,7 @@ CATEGORIES : TableView find_all_date(size_t column_ndx, time_t value); TableView find_all_string(size_t column_ndx, const char* value); TableView find_all_float(size_t column_ndx, float value); - TableView find_all_double(size_t column_ndx, double value); + TableView find_all_double(size_t column_ndx, double value); ConstTableView find_all_int(size_t column_ndx, int64_t value) const; ConstTableView find_all_bool(size_t column_ndx, bool value) const; @@ -329,7 +326,7 @@ CATEGORIES : - CODE : ex_cpp_dyn_view_find_all_xxx DESCR : - g_dyn_view_sort: - NAMES : sort + NAMES : sort (not yet implemented) SUMMARY : *g_dyn_view_get_sorted_view_summary DESCR : *g_dyn_view_get_sorted_view_desc PARAMS: @@ -347,7 +344,7 @@ CATEGORIES : - g_dyn_view_sum: - g_dyn_view_sum_float: - g_dyn_view_sum_double: - NAMES : [sum, sum_float, sum_double] + NAMES : [sum (not yet implemented), sum_float, sum_double] SUMMARY : *g_dyn_view_sum_summary DESCR : *g_dyn_view_sum_descr CONST : True @@ -368,7 +365,7 @@ CATEGORIES : - g_dyn_view_maximum: - g_dyn_view_maximum_float: - g_dyn_view_maximum_double: - NAMES : [maximum, maximum_float, maximum_double] + NAMES : [max (not yet implemented), maximum_float, maximum_double] SUMMARY : *g_dyn_view_maximum_summary DESCR : *g_dyn_view_maximum_descr CONST : True @@ -389,7 +386,7 @@ CATEGORIES : - g_dyn_view_minimum: - g_dyn_view_minimum_float: - g_dyn_view_minimum_double: - NAMES : [minimum, minimum_float, minimum_double] + NAMES : [min (not yet implemented), minimum_float, minimum_double] SUMMARY : *g_dyn_view_minimum_summary DESCR : *g_dyn_view_minimum_descr CONST : True @@ -410,7 +407,7 @@ CATEGORIES : - Dump: METHODS: - g_dyn_view_to_json: - NAMES : to_json + NAMES : to_json (not yet implemented) SUMMARY : *g_dyn_table_to_json_summary DESCR : *g_dyn_view_to_json_descr PARAMS: @@ -421,7 +418,7 @@ CATEGORIES : - CODE : ex_cpp_dyn_view_to_json DESCR : - g_dyn_view_to_string: - NAMES : to_string + NAMES : to_string (not yet implemented) SUMMARY : *g_dyn_view_to_string_summary DESCR : *g_dyn_view_to_string_descr CONST : true From 7ea1e306db4c55c7c201abed1e9eb3baf4a37ec5 Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Wed, 1 May 2013 17:38:34 +0200 Subject: [PATCH 7/9] updated doc/ref/data --- doc/ref/data/dyn_query_ref.yaml | 170 ++++++-------------- doc/ref/data/reference.yaml | 8 +- doc/ref/data/shared_group_ref.yaml | 249 +++-------------------------- 3 files changed, 69 insertions(+), 358 deletions(-) diff --git a/doc/ref/data/dyn_query_ref.yaml b/doc/ref/data/dyn_query_ref.yaml index 3b16dd8f1a..4baa132447 100755 --- a/doc/ref/data/dyn_query_ref.yaml +++ b/doc/ref/data/dyn_query_ref.yaml @@ -4,7 +4,11 @@ ## TODO: Describe limitations about using correct versions of the methods on the right column_types. ## TODO: Detail what is allowed to pass in parameters (index within size() etc) -## TODO: Describe start, end index parameters in searches. end is not inclusive. +## TODO: Describe start, end index parameters in searches. end is not inclusive. + +## JJEPSEN: "or" a obj-c keyword? +## JJEPSEN: count() does not take a column index as parameter (like in c++) +## JJEPSEN: max, min not defined for time compare as in c++. ID : class_dyn_query TITLE : Query (dynamic) @@ -281,7 +285,8 @@ CATEGORIES : - g_dyn_query_group: NAMES : group DESCR : *g_dyn_query_group_descr - SUMMARY : *g_dyn_query_group_summary + SUMMARY : *g_dyn_query_group_summary + SIGNATURE: (void)group RETURN: TYPES : Query DESCR : The query object. @@ -289,9 +294,10 @@ CATEGORIES : - DESCR : CODE : ex_cpp_dyn_query_group - g_dyn_query_endGroup: - NAMES : end_group + NAMES : endGroup DESCR : *g_dyn_query_endGroup_descr - SUMMARY : *g_dyn_query_endGroup_summary + SUMMARY : *g_dyn_query_endGroup_summary + SIGNATURE: (void)endgroup RETURN: TYPES : Query DESCR : The query object. @@ -299,9 +305,10 @@ CATEGORIES : - DESCR : CODE : ex_cpp_dyn_query_group - g_dyn_query_or: - NAMES : Or + NAMES : or DESCR : *g_dyn_query_or_descr - SUMMARY : *g_dyn_query_or_summary + SUMMARY : *g_dyn_query_or_summary + SIGNATURE: (void)or RETURN: TYPES : Query DESCR : The query object. @@ -311,7 +318,8 @@ CATEGORIES : - g_dyn_query_subtable: NAMES : subtable DESCR : *g_dyn_query_subtable_descr - SUMMARY : *g_dyn_query_subtable_summary + SUMMARY : *g_dyn_query_subtable_summary + SIGNATURE: (void)subtable:(size_t)column PARAMS: - NAME : column TYPES : size_t @@ -323,9 +331,10 @@ CATEGORIES : - DESCR : CODE : ex_cpp_dyn_query_subtable - g_dyn_query_endSubtable: - NAMES : end_subtable + NAMES : parent DESCR : *g_dyn_query_endSubtable_descr - SUMMARY : *g_dyn_query_endSubtable_summary + SUMMARY : *g_dyn_query_endSubtable_summary + SIGNATURE: (void)parent RETURN: TYPES : Query DESCR : The query object. @@ -336,7 +345,7 @@ CATEGORIES : METHODS: - g_dyn_query_find_all_const: - g_dyn_query_find_all: - NAMES : find_all + NAMES : findAll (not yet implemented) DESCR : *g_dyn_query_find_all_descr SUMMARY : *g_dyn_query_find_all_summary SIGNATURE: | @@ -359,7 +368,7 @@ CATEGORIES : - DESCR : CODE : ex_cpp_dyn_query_findall - g_dyn_query_find_next: - NAMES : find_next + NAMES : findNext (not yet implemented) DESCR : *g_dyn_query_find_next_descr SUMMARY : *g_dyn_query_find_next_summary PARAMS: @@ -375,30 +384,18 @@ CATEGORIES : - g_dyn_query_sum: - g_dyn_query_sum_float: - g_dyn_query_sum_double: - NAMES : [sum, sum_float, sum_double] + NAMES : [sum*, sum_float, sum_double] DESCR : *g_dyn_query_sum_descr SUMMARY : *g_dyn_query_sum_summary CONST : true SIGNATURE: | - int64_t sum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; - double sum_float(..same parameters as above..) - double sum_double(..same parameters as above..) + (int64_t)sumInt:(size_t)col_ndx + (double)sumFloat:(size_t)col_ndx + (double)sumDouble:(size_t)col_ndx PARAMS: - - NAME : column_ndx + - NAME : col_ndx DESCR : Column index. The datatype of the column must match the function called. E.g. sum_float() can only be used on columns which contains floats. TYPES : size_t - - NAME : resultcount - DESCR : The number of rows used to calculate the sum. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." RETURN: TYPES : [int64_t, float, double] DESCR : The sum. @@ -408,7 +405,8 @@ CATEGORIES : - g_dyn_query_size: NAMES : count DESCR : *g_dyn_query_size_descr - SUMMARY : *g_dyn_query_size_summary + SUMMARY : *g_dyn_query_size_summary + SIGNATURE: (size_t)count CONST : true PARAMS: - NAME : column @@ -433,31 +431,19 @@ CATEGORIES : - g_dyn_query_maximum_double: - g_dyn_query_maximum_float: - g_dyn_query_maximum: - NAMES : maximum + NAMES : max* DESCR : *g_dyn_query_maximum_descr SUMMARY : *g_dyn_query_maximum_summary CONST : true SIGNATURE: | - int64_t maximum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; - float maximum_float(..parameters as above..) - double maximum_double(..parameters as above..) - time_t maximum_date(..parameters as above..) + (int64_t)maxInt:(size_t)col_ndx + (float)maxFloat:(size_t)col_ndx + (double)maxDouble:(size_t)col_ndx + PARAMS: - - NAME : column_ndx + - NAME : col_ndx DESCR : Column index. The datatype of the column must match the function called. E.g. maximum_float() can only be used on columns which contains floats. TYPES : size_t - - NAME : resultcount - DESCR : The number of rows used to find the highest value. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to search. Default: -1 (infinity)." RETURN: TYPES : [int64_t, float, double, time_t] DESCR : The highest value. @@ -468,31 +454,18 @@ CATEGORIES : - g_dyn_query_minimum_double: - g_dyn_query_minimum_float: - g_dyn_query_minimum: - NAMES : minimum + NAMES : min* DESCR : *g_dyn_query_minimum_descr SUMMARY : *g_dyn_query_minimum_summary CONST : true SIGNATURE: | - int64_t minimum(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; - float minimum_float(..parameters as above..) - double minimum_double(..parameters as above..) - time_t minimum_date(..parameters as above..) + (int64_t)minInt:(size_t)col_ndx + (float)minFloat:(size_t)col_ndx + (double)minDouble:(size_t)col_ndx PARAMS: - - NAME : column_ndx + - NAME : col_ndx DESCR : Column index. The datatype of the column must match the function called. E.g. minimum_float() can only be used on columns which contains floats. TYPES : size_t - - NAME : resultcount - DESCR : The number of rows used to find the lowest value. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." RETURN: TYPES : [int64_t, float, double, time_t] DESCR : The lowest value. @@ -502,30 +475,18 @@ CATEGORIES : - g_dyn_query_average_double: - g_dyn_query_average_float: - g_dyn_query_average: - NAMES : average + NAMES : avg* SUMMARY : *g_dyn_query_average_summary DESCR : *g_dyn_query_average_descr CONST : true SIGNATURE: | - double average(size_t column_ndx, size_t* resultcount=NULL, size_t start=0, size_t end = size_t(-1), size_t limit=size_t(-1)) const; - double average_float(..as above..) - double average_double(..as above..) + (double)avgInt:(size_t)col_ndx + (double)avgFloat:(size_t)col_ndx + (double)avgDouble:(size_t)col_ndx PARAMS: - - NAME : column_ndx + - NAME : col_ndx DESCR : Column index. The datatype of the column must match the function called. E.g. average_float() can only be used on columns which contains floats. TYPES : size_t - - NAME : resultcount - DESCR : The number of rows used to calculate the average. If zero, the return value is undefined. - TYPES : size_t* - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." RETURN: TYPES : double DESCR : The average. @@ -533,7 +494,7 @@ CATEGORIES : - DESCR : CODE : ex_cpp_dyn_query_average - g_dyn_query_remove: - NAMES : remove + NAMES : remove (not yet implemented) DESCR : *g_dyn_query_remove_descr SUMMARY : *g_dyn_query_remove_summary CONST : true @@ -558,45 +519,4 @@ CATEGORIES : DESCR : The number of rows removed. EXAMPLES: - DESCR : - CODE : ex_cpp_dyn_query_remove -- Multithreaded: - METHODS: - - g_dyn_query_find_all_multi: - - g_dyn_query_find_all_const_multi: - NAMES : find_all_multi - DESCR : *g_dyn_query_find_all_multi_descr - SUMMARY : *g_dyn_query_find_all_multi_summary - SIGNATURE: | - TableView find_all_multi(Table& table, size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); - ConstTableView find_all_multi(const Table& table, size_t start=0, size_t end=size_t(-1), size_t limit=size_t(-1)); - - PARAMS: - - NAME : start - TYPES : size_t - DESCR : "Row to begin search. Default: 0." - - NAME : end - TYPES : size_t - DESCR : "Row to stop search. Default: -1 (infinity)." - - NAME : limit - TYPES : size_t - DESCR : "Maximum number of rows to find. Default: -1 (infinity)." - RETURN: - TYPES : [TableView, ConstTableView] - DESCR : The TableView object. - EXAMPLES: - - DESCR : - CODE : ex_cpp_dyn_query_find_all_multi - - g_dyn_query_set_threads: - NAMES : set_threads - SUMMARY : *g_dyn_query_set_threads_summary - DESCR : *g_dyn_query_set_threads_descr - PARAMS: - - NAME : threadcount - TYPES : unsigned int - DESCR : Number of threads. - RETURN: - DESCR : true if succesfull, false otherwise. - TYPES : int - EXAMPLES: - - DESCR : - CODE : ex_cpp_dyn_query_find_all_multi + CODE : ex_cpp_dyn_query_remove \ No newline at end of file diff --git a/doc/ref/data/reference.yaml b/doc/ref/data/reference.yaml index de732735be..6c7e8be544 100644 --- a/doc/ref/data/reference.yaml +++ b/doc/ref/data/reference.yaml @@ -49,10 +49,10 @@ CATEGORIES: # list global class-id in order of appearence # - typed_table # Global Class name. File: 'typed_table_ref.yaml' # - typed_view # - typed_query -- Dynamic Table: - - dyn_table - - dyn_view - - dyn_query +#- Dynamic Table: +# - dyn_table +# - dyn_view +# - dyn_query #- Collection: # - group # - shared_group diff --git a/doc/ref/data/shared_group_ref.yaml b/doc/ref/data/shared_group_ref.yaml index 0486e8649e..227c92921a 100755 --- a/doc/ref/data/shared_group_ref.yaml +++ b/doc/ref/data/shared_group_ref.yaml @@ -1,41 +1,11 @@ # -# C++ reference documentation for Shared Group class +# Obj-C reference documentation for Shared Group class # ID : class_shared_group TITLE : SharedGroup -SUMMARY : &g_shared_group_summary - Sharing groups -DESCR : &g_shared_group_descr - > - Database files can be shared across running applications. - - When two threads or processes want to access the same - database file, they must each create their own - instance of SharedGroup. - - If the database file does not already exist, it will - be created. When multiple threads are involved, it is - safe to let the first thread, that gets to it, create - the file. - - While at least one instance of SharedGroup exists for - a specific database file, a lock file will exist - too. The lock file will be placed in the same - directory as the database file, and its name is - derived by adding the suffix '.lock' to the name of - the database file. - - Processes that share a database file must reside on - the same host. - - Moreover, the class also provide a transactional - interface to TightDB. Transactions are divided into - read and write transactions. While read transactions - do not modify the table and thereby the group, write - transactions do. This division is important to remember - as derived objects (tables, views, etc.) are either - writable or not. +SUMMARY : *g_shared_group_summary +DESCR : *g_shared_group_descr SEE : EXAMPLES: - DESCR : @@ -46,39 +16,13 @@ CATEGORIES: METHODS: - g_shared_group_constructor: NAMES : SharedGroup - SUMMARY : &g_shared_group_constructor_summary - Create a shared group. - DESCR : &g_shared_group_constructor_descr - > - Open a shared group (will be created if it does not already exist). - - By default the shared group will be fully durable, so that each commit writes its changes - to disk in an atomic manner that guarantees that the file is always consistent. - - If your data is transient, and does not need to persist to disk (like for caching or - shared state between processes). You can open the shared group in mem-only mode. Then the - file will just be used for identification and backing and will be removed again when there - are no more processes using it. - - Note that a shared group can only be opened in the mode it was created in. - - A SharedGroup may also be constructed in an unattached - state (2). See open() and is_attached() for more on - this. - SIGNATURE: > - SharedGroup(const std::string& file, bool no_create = false, DurabilityLevel dlevel); - SharedGroup(unattached_tag); + SUMMARY : *g_shared_group_constructor_summary + DESCR : *g_shared_group_constructor_descr + SIGNATURE: (TightdbSharedGroup *)groupWithFilename:(NSString *)filename PARAMS: - - NAME : file + - NAME : filename TYPES : const std::string& DESCR : Filesystem path of the TightDB database file to be opened. - - NAME : no_create - TYPES : bool - DESCR : If set to true, File::NotFound will be thrown - if the file does not already exist. - - NAME : dlevel - TYPES : DurabilityLevel - DESCR : Durability Level (durability_Full or durability_MemOnly) RETURN: TYPES : SharedGroup DESCR : A shared group. @@ -92,183 +36,30 @@ CATEGORIES: EXAMPLES: - CODE : ex_cpp_shared_group_constructor DESCR : -- Utilities: - METHODS: - - g_shared_group_open: - NAMES : open - SUMMARY : &g_shared_group_open_summary - Is this SharedGroup instance in its attached state? - DESCR : &g_shared_group_open_descr - Attach this SharedGroup instance to the specified - database file. - - If the database file does not already exist, it will - be created (unless no_create is set to - true.) When multiple threads are involved, it is safe - to let the first thread, that gets to it, create the - file. - - While at least one instance of SharedGroup exists for - a specific database file, a "lock" file will be - present too. The lock file will be placed in the same - directory as the database file, and its name will be - derived by appending ".lock" to the name of the - database file. - - When multiple SharedGroup instances refer to the same - file, they must specify the same durability level, - otherwise an exception will be thrown. - - Calling open() on a SharedGroup instance that is - already in the attached state has undefined behavior. - PARAMS: - - NAME : file - TYPES : const std::string& - DESCR : Filesystem path of the TightDB database file to be opened. - - NAME : no_create - TYPES : bool - DESCR : If set to true, File::NotFound will be thrown - if the file does not already exist. - - NAME : dlevel - TYPES : DurabilityLevel - DESCR : Durability Level (durability_Full or durability_MemOnly) - THROWS: - - EXCEPT : File::OpenError - DESCR : If the file could not be opened. If the reason - corresponds to one of the exception types that are - derived from File::OpenError, the derived exception - type is thrown. Note that InvalidDatabase is among - these derived exception types. - EXAMPLES: - - DESCR : - CODE : ex_cpp_shared_group_open - - g_shared_group_is_attached: - NAMES : is_attached - SUMMARY : &g_shared_group_is_attached_summary - Is this SharedGroup instance in its attached state? - DESCR : &g_shared_group_is_attached_descr - A shared group may be created in the unattached - state, and then later attached to a file with a call - to one of the open() methods. Calling any method - other than open(), is_attached(), and ~SharedGroup() - on an unattached instance results in undefined - behavior. - CONST : true - RETURN: - TYPES : bool - DESCR : true if attached, false otherwise. - EXAMPLES: - - DESCR : - CODE : ex_cpp_shared_group_is_attached - - g_shared_group_has_changed: - NAMES : has_changed - SUMMARY : &g_shared_group_has_changed_summary - Has shared group been changed since last transaction? - DESCR : &g_shared_group_has_changed_descr - > - This method tests if the shared group has been modified (by another process), - since the last transaction. - - It has very little overhead and does not affect other processes, so it is - ok to call it at regular intervals (like in the idle handler of an application). - RETURN: - TYPES : bool - DESCR : true if it has changed, false otherwise. - EXAMPLES: - - CODE : ex_cpp_shared_group_has_changed - DESCR : - Write transactions: METHODS: - g_shared_group_begin_write: - NAMES : begin_write - SUMMARY : &g_shared_group_begin_write_summary - Initiate a transaction. - DESCR : &g_shared_group_begin_write_descr - Begin writing to a shared group. + NAMES : writeTransaction + SUMMARY : *g_shared_group_begin_write_summary + DESCR : *g_shared_group_begin_write_descr + SIGNATURE: (void)writeTransaction:(TightdbSharedGroupWriteTransactionBlock)block RETURN: - TYPES : Group& - DESCR : A group. + TYPES : TightdbSharedGroupReadTransactionBlock + DESCR : A block of code. EXAMPLES: - CODE : ex_cpp_shared_group_begin_write DESCR : - - g_shared_group_begin_commit: - NAMES : commit - SUMMARY : &g_shared_group_commit_summary - Commit a transaction. - DESCR : &g_shared_group_commit_descr - This method closes a transaction and changes are written to the group. - EXAMPLES: - - CODE : ex_cpp_shared_group_commit - DESCR : - - g_shared_group_rollback: - NAMES : rollback - SUMMARY : &g_shared_group_rollback_summary - Rollback a transaction. - DESCR : &g_shared_group_rollback_descr - This method descards all changes. - EXAMPLES: - - CODE : ex_cpp_shared_group_rollback - DESCR : - - g_shared_group_interrupt_transact: - NAMES : interrupt_transact - SUMMARY : &g_shared_group_interrupt_transact_summary - Interrupt any blocking call. - DESCR : &g_shared_group_interrupt_transact_descr - > - This function may be called asynchronously to interrupt any - blocking call that is part of a transaction in a replication - setup. Only {@link g_shared_group_begin_write} and - modifying function that are part - of a write transaction can block. The transaction is - interrupted only if such a call is blocked or would - block. This function may be called from a different thread. It - may not be called directly from a system signal handler. When - a transaction is interrupted, the only valid member function - to call is {@link g_shared_group_rollback}. If a client calls - {@link g_shared_group_clear_interrupt_transact} after having - called {@link g_shared_group_rollback}, it - may then resume normal operation on this database/shared group. - Currently, - transaction interruption works by throwing an exception from - one of the mentioned member functions that may block. - EXAMPLES: - - CODE : ex_cpp_shared_group_interrupt_transact - DESCR : - - g_shared_group_clear_interrupt_transact: - NAMES : clear_interrupt_transact - SUMMARY : &g_shared_group_clear_interrupt_transact_summary - Clean up interrupted state. - DESCR : &g_shared_group_clear_interrupt_transact_descr - > - This method clears the interrupted state of the shared group after rolling - back a transaction. It is not an error to call this function - in a situation where no interruption has occured. - SEE : g_shared_group_interrupt_transact - EXAMPLES: - - CODE : ex_cpp_shared_group_clear_interrupt_transact - DESCR : - Read transactions: METHODS: - g_shared_group_begin_read: - NAMES : begin_read - SUMMARY : &g_shared_group_begin_read_summary - Initiate reading. - DESCR : &g_shared_group_begin_read_descr - Begin reading from a shared group. + NAMES : readTransaction + SUMMARY : *g_shared_group_begin_read_summary + DESCR : *g_shared_group_begin_read_descr + SIGNATURE: (void)readTransaction:(TightdbSharedGroupReadTransactionBlock)block CONST : True RETURN: - TYPES : Group& - DESCR : A group. + TYPES : TightdbSharedGroupReadTransactionBlock + DESCR : A block of code. EXAMPLES: - CODE : ex_cpp_shared_group_begin_read - DESCR : - - g_shared_group_end_read: - NAMES : end_read - SUMMARY : &g_shared_group_end_read_summary - Stop reading from a group. - DESCR : &g_shared_group_end_read_descr - This method stops reading from a shared group. - EXAMPLES: - - CODE : ex_cpp_shared_group_end_read - DESCR : - + DESCR : \ No newline at end of file From 7ab73dcdda4d5b3729ec119fbe6a65e32a9fd489 Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Fri, 17 May 2013 18:20:02 +0200 Subject: [PATCH 8/9] updated doc/ref/data --- doc/ref/data/dyn_table_ref.yaml | 66 ++++++++++++------------ doc/ref/data/dyn_view_ref.yaml | 16 +++--- doc/ref/data/mixed_ref.yaml | 84 +++++++++++++------------------ doc/ref/data/reference.yaml | 28 +++++------ doc/ref/data/typed_table_ref.yaml | 56 ++++++++++----------- 5 files changed, 119 insertions(+), 131 deletions(-) diff --git a/doc/ref/data/dyn_table_ref.yaml b/doc/ref/data/dyn_table_ref.yaml index f26515836f..8adfbc52eb 100755 --- a/doc/ref/data/dyn_table_ref.yaml +++ b/doc/ref/data/dyn_table_ref.yaml @@ -1,12 +1,12 @@ # # Obj-C reference documentation for Table class # - -# INCONSISTENCY index* (row_ndx) -# INCONSISTENCY getTable & insertSubtable -# NAMING deleteRow -> remove, get -> getInt, set -> setInt (and ndx->row_ndx) -# MISSING lookup -# MISSING where (only possible in typed tables) + +# INCONSISTENCY index* (row_ndx) +# INCONSISTENCY getTable & insertSubtable +# NAMING deleteRow -> remove, get -> getInt, set -> setInt (and ndx->row_ndx) +# MISSING lookup +# MISSING where (only possible in typed tables) ID : class_dyn_table TITLE : Table (dynamic) @@ -23,7 +23,7 @@ CATEGORIES : - g_dyn_table_size: NAMES : count SUMMARY : *g_dyn_table_size_summary - DESCR : *g_dyn_table_size_descr + DESCR : *g_dyn_table_size_descr SIGNATURE: (size_t)count CONST : True RETURN: @@ -35,7 +35,7 @@ CATEGORIES : - g_dyn_table_is_empty: NAMES : isEmpty SUMMARY : *g_dyn_table_is_empty_summary - DESCR : *g_dyn_table_is_empty_descr + DESCR : *g_dyn_table_is_empty_descr SIGNATURE: (BOOL)isEmpty CONST : True RETURN: @@ -60,7 +60,7 @@ CATEGORIES : - g_dyn_table_clear: NAMES : clear SUMMARY : *g_dyn_table_clear_summary - DESCR : *g_dyn_table_clear_descr + DESCR : *g_dyn_table_clear_descr SIGNATURE: (void)clear EXAMPLES: - CODE : ex_cpp_dyn_table_clear @@ -68,7 +68,7 @@ CATEGORIES : - g_dyn_table_optimize: NAMES : optimize SUMMARY : *g_dyn_table_optimize_summary - DESCR : *g_dyn_table_optimize_descr + DESCR : *g_dyn_table_optimize_descr SIGNATURE: (void)optimize EXAMPLES: - CODE : ex_cpp_dyn_table_optimize @@ -76,7 +76,7 @@ CATEGORIES : - g_dyn_table_opertator==: NAMES : isEqual SUMMARY : *g_dyn_table_operator_eq_summary - DESCR : *g_dyn_table_operator_eq_descr + DESCR : *g_dyn_table_operator_eq_descr SIGNATURE: (BOOL)isEqual:(TightdbTable *)other CONST : True PARAMS: @@ -94,7 +94,7 @@ CATEGORIES : - g_dyn_table_get_column_count: NAMES : getColumnCount SUMMARY : *g_dyn_table_get_column_count_summary - DESCR : *g_dyn_table_get_column_count_descr + DESCR : *g_dyn_table_get_column_count_descr SIGNATURE: (size_t)getColumnCount CONST : True RETURN: @@ -106,7 +106,7 @@ CATEGORIES : - g_dyn_table_get_column_name: NAMES : getColumnName SUMMARY : *g_dyn_table_get_column_name_summary - DESCR : *g_dyn_table_get_column_name_descr + DESCR : *g_dyn_table_get_column_name_descr SIGNATURE: (NSString *)getColumnName:(size_t)ndx CONST : True PARAMS: @@ -122,7 +122,7 @@ CATEGORIES : - g_dyn_table_get_column_index: NAMES : getColumnIndex SUMMARY : *g_dyn_table_get_column_index_summary - DESCR : *g_dyn_table_get_column_index_descr + DESCR : *g_dyn_table_get_column_index_descr SIGNATURE: (size_t)getColumnIndex:(NSString *)name CONST : True PARAMS: @@ -151,7 +151,7 @@ CATEGORIES :
  • tightdb_Table
  • tightdb_Date
  • tightdb_Mixed
  • - + SIGNATURE: (TightdbType)getColumnType:(size_t)ndx CONST : True PARAMS: @@ -170,7 +170,7 @@ CATEGORIES : NAMES : addRow SUMMARY : *g_dyn_table_add_empty_row_summary DESCR : *g_dyn_table_add_empty_row_descr - SIGNATURE: (size_t)addRow + SIGNATURE: (size_t)addRow PARAMS: - NAME : num_rows TYPES : size_t @@ -205,7 +205,7 @@ CATEGORIES : (void)insertFloat:(size_t)col_ndx ndx:(size_t)ndx value:(float)value (void)insertDouble:(size_t)col_ndx ndx:(size_t)ndx value:(double)value (void)insertDate:(size_t)col_ndx ndx:(size_t)ndx value:(time_t)value - (void)insertString:(size_t)col_ndx ndx:(size_t)ndx value:(NSString *)value + (void)insertString:(size_t)col_ndx ndx:(size_t)ndx value:(NSString *)value (void)insertBinary:(size_t)col_ndx ndx:(size_t)ndx value:(TightdbBinary *)value (void)insertBinary:(size_t)col_ndx ndx:(size_t)ndx data:(const char *)data size:(size_t)size (void)insertMixed:(size_t)col_ndx ndx:(size_t)row_ndx value:(TightdbMixed *)value @@ -307,9 +307,9 @@ CATEGORIES : (void)setDouble:(size_t)col_ndx ndx:(size_t)ndx value:(double)value (void)setDate:(size_t)col_ndx ndx:(size_t)ndx value:(time_t)value (void)setString:(size_t)col_ndx ndx:(size_t)ndx value:(NSString *)value - (void)setBinary:(size_t)col_ndx ndx:(size_t)ndx value:(TightdbBinary *)value + (void)setBinary:(size_t)col_ndx ndx:(size_t)ndx value:(TightdbBinary *)value (void)setBinary:(size_t)col_ndx ndx:(size_t)ndx data:(const char *)data size:(size_t)size - (void)setMixed:(size_t)col_ndx ndx:(size_t)row_ndx value:(TightdbMixed *)value + (void)setMixed:(size_t)col_ndx ndx:(size_t)row_ndx value:(TightdbMixed *)value PARAMS: - NAME : col_ndx @@ -332,7 +332,7 @@ CATEGORIES : - g_dyn_table_get_subtable_size: NAMES : getTableSize SUMMARY : *g_dyn_table_get_subtable_size_summary - DESCR : *g_dyn_table_get_subtable_size_descr + DESCR : *g_dyn_table_get_subtable_size_descr SIGNATURE: (size_t)getTableSize:(size_t)col_ndx ndx:(size_t)row_ndx CONST : true PARAMS: @@ -351,7 +351,7 @@ CATEGORIES : - g_dyn_table_clear_subtable: NAMES : clearSubtable SUMMARY : *g_dyn_table_clear_subtable_summary - DESCR : *g_dyn_table_clear_subtable_descr + DESCR : *g_dyn_table_clear_subtable_descr SIGNATURE: (void)clearSubtable:(size_t)col_ndx ndx:(size_t)row_ndx PARAMS: - NAME : col_ndx @@ -368,7 +368,7 @@ CATEGORIES : - g_dyn_table_set_index: NAMES : setIndex SUMMARY : *g_dyn_table_set_index_summary - DESCR : *g_dyn_table_set_index_descr + DESCR : *g_dyn_table_set_index_descr SIGNATURE: (void)setIndex:(size_t)col_ndx PARAMS: - NAME : col_ndx @@ -380,7 +380,7 @@ CATEGORIES : - g_dyn_table_has_index: NAMES : hasIndex SUMMARY : *g_dyn_table_has_index_summary - DESCR : *g_dyn_table_has_index_descr + DESCR : *g_dyn_table_has_index_descr SIGNATURE: (BOOL)hasIndex:(size_t)col_ndx CONST : true PARAMS: @@ -398,7 +398,7 @@ CATEGORIES : - g_dyn_table_lookup: NAMES : lookup (not yet implemented) SUMMARY : *g_dyn_table_lookup_summary - DESCR : *g_dyn_table_lookup_descr + DESCR : *g_dyn_table_lookup_descr SIGNATURE: CONST : True PARAMS: @@ -424,8 +424,8 @@ CATEGORIES : (size_t)findDate:(size_t)col_ndx value:(time_t)value (size_t)findString:(size_t)col_ndx value:(NSString *)value (size_t)findFloat:(size_t)col_ndx value:(float)value - (size_t)findDouble:(size_t)col_ndx value:(double)value - (size_t)findBinary:(size_t)col_ndx value:(TightdbBinary *)value + (size_t)findDouble:(size_t)col_ndx value:(double)value + (size_t)findBinary:(size_t)col_ndx value:(TightdbBinary *)value CONST : True PARAMS: @@ -454,7 +454,7 @@ CATEGORIES : - g_find_all_float_const: - g_find_all_double_const: NAMES : findAll* (not implemented for all types yet) - SUMMARY : *g_find_all_xxx_summary + SUMMARY : *g_dyn_table_find_all_xxx_summary DESCR : > The method finds all occurences of a given value in a specific column. The rows are returned as a {@link class_dyn_tableview} object. @@ -529,15 +529,15 @@ CATEGORIES : CODE : ex_cpp_dyn_table_where - Aggregates: METHODS: - - g_dyn_table_count_int: + - g_dyn_table_count_int: - g_dyn_table_count_string: NAMES : count* SUMMARY : *g_dyn_table_count_summary - DESCR : *g_dyn_table_count_descr - SIGNATURE: | - (size_t)countInt:(size_t)col_ndx target:(int64_t)target - (size_t)countFloat:(size_t)col_ndx target:(float)target - (size_t)countDouble:(size_t)col_ndx target:(double)target + DESCR : *g_dyn_table_count_descr + SIGNATURE: | + (size_t)countInt:(size_t)col_ndx target:(int64_t)target + (size_t)countFloat:(size_t)col_ndx target:(float)target + (size_t)countDouble:(size_t)col_ndx target:(double)target (size_t)countString:(size_t)col_ndx target:(NSString *)target CONST : True PARAMS: diff --git a/doc/ref/data/dyn_view_ref.yaml b/doc/ref/data/dyn_view_ref.yaml index 89ce8d204e..169a7acf61 100755 --- a/doc/ref/data/dyn_view_ref.yaml +++ b/doc/ref/data/dyn_view_ref.yaml @@ -18,7 +18,7 @@ CATEGORIES : NAMES : count SUMMARY : *g_dyn_table_size_summary DESCR : *g_dyn_table_size_descr - CONST : True + CONST : True SIGNATURE: (size_t)count RETURN: TYPES : size_t @@ -29,7 +29,7 @@ CATEGORIES : - g_dyn_view_is_empty: NAMES : isEmpty SUMMARY : *g_dyn_view_is_empty_summary - DESCR : *g_dyn_view_is_empty_descr + DESCR : *g_dyn_view_is_empty_descr SIGNATURE: (BOOL)isEmpty CONST : True RETURN: @@ -43,7 +43,7 @@ CATEGORIES : - g_dyn_view_clear: NAMES : clear SUMMARY : *g_dyn_table_clear_summary - DESCR : *g_dyn_view_clear_descr + DESCR : *g_dyn_view_clear_descr SIGNATURE: (void)clear EXAMPLES: - CODE : ex_cpp_dyn_view_clear @@ -111,7 +111,7 @@ CATEGORIES : - g_dyn_view_get_source_ndx: NAMES : getSourceNdx SUMMARY : *g_dyn_view_get_source_ndx_summary - DESCR : *g_dyn_view_get_source_ndx_descr + DESCR : *g_dyn_view_get_source_ndx_descr SIGNATURE: (size_t)getSourceNdx:(size_t)ndx CONST : True PARAMS: @@ -260,8 +260,8 @@ CATEGORIES : - g_dyn_view_find_first_date: - g_dyn_view_find_first_string: NAMES : find* (not yet implemented) - SUMMARY : *g_find_first_xxx_summary - DESCR : *g_find_first_xxx_descr + SUMMARY : *g_dyn_table_find_first_xxx_summary + DESCR : *g_dyn_table_find_first_xxx_descr SIGNATURE: | size_t find_first_int(size_t column_ndx, int64_t value) const; size_t find_first_bool(size_t column_ndx, bool value) const; @@ -296,8 +296,8 @@ CATEGORIES : - g_dyn_view_find_all_date_const: - g_dyn_view_find_all_string_const: NAMES : findAll* (not yet implemented) - SUMMARY : *g_find_all_xxx_summary - DESCR : *g_find_all_xxx_descr + SUMMARY : *g_dyn_table_find_all_xxx_summary + DESCR : *g_dyn_table_find_all_xxx_descr SIGNATURE: | TableView find_all_int(size_t column_ndx, int64_t value); TableView find_all_bool(size_t column_ndx, bool value); diff --git a/doc/ref/data/mixed_ref.yaml b/doc/ref/data/mixed_ref.yaml index f7264da7ec..a109c95d80 100755 --- a/doc/ref/data/mixed_ref.yaml +++ b/doc/ref/data/mixed_ref.yaml @@ -1,21 +1,14 @@ # -# C++ reference documentation for Mixed class +# Obj-C reference documentation for Mixed class # +# JJEPSEN: C++ has single signature constructor, Obj-C has one for each type. +# JJEPSEN: isEqual is not documented in C++ doc? + ID : class_mixed TITLE : Mixed -SUMMARY : &g_mixed_summary - Flexible data type. -DESCR : &g_mixed_descr - The Mixed class is a light-weight implementation of a flexible type system. Once - a variable is given a value via a constructor, it is not possible to modify the - value. Any supported type of TightDB can be used with the Mixed class. The current - supported types are boolean, integer, timestamps, strings, binary data and - {@link class_dyn_table}. - - Using the Mixed class resembles using a dynamic typed language. The flexibility - of mixing types has a cost as compacting data is harder and queries will generally - be slower. +SUMMARY : *g_mixed_summary +DESCR : *g_mixed_descr SEE : EXAMPLES: - DESCR : @@ -25,25 +18,22 @@ CATEGORIES: - Constructors: METHODS: - g_mixed_constructor: - NAMES : Mixed - SUMMARY : &g_mixed_constructor_summary - Create a Mixed variable. - DESCR : &g_mixed_constructor_descr - > - Mixed typed variables are instances of the Mixed class. Mixed typed values add a high - degree of flexibility to schemas. + NAMES : Mixed* + SUMMARY : *g_mixed_constructor_summary + DESCR : *g_mixed_constructor_descr SIGNATURE: | - Mixed(bool v) - Mixed(int64_t v) - Mixed(float v) - Mixed(double v) - Mixed(Date v) - Mixed(const char* v) - Mixed(BinaryData v) - Mixed(subtable_tag) + (TightdbMixed *)mixedWithBool:(BOOL)value + (TightdbMixed *)mixedWithInt64:(int64_t)value + (TightdbMixed *)mixedWithFloat:(float)value + (TightdbMixed *)mixedWithDouble:(double)value + (TightdbMixed *)mixedWithDate:(time_t)value + (TightdbMixed *)mixedWithString:(NSString *)value + (TightdbMixed *)mixedWithBinary:(TightdbBinary *)value + (TightdbMixed *)mixedWithBinary:(const char *)data size:(size_t)size + (TightdbMixed *)mixedWithTable:(TightdbTable *)value PARAMS: - NAME : v - TYPES : [bool, int64_t, float, double, Date, const char*, BinaryData] + TYPES : [bool, int64_t, float, double, Date, NSString, TightdbBinary, const char*, TightdbTable] DESCR : The value. EXAMPLES: - CODE : ex_cpp_mixed_constructor @@ -51,14 +41,13 @@ CATEGORIES: - Getters: METHODS: - g_mixed_get_type: - NAMES : get_type - SUMMARY : &g_mixed_get_type_summary - Get the type. - DESCR : &g_mixed_get_type_descr - This method retrieves the real type of a Mixed variable. + NAMES : getType + SUMMARY : *g_mixed_get_type_summary + DESCR : *g_mixed_get_type_descr + SIGNATURE: (TightdbType)getType CONST : True RETURN: - TYPES : DataType + TYPES : TightdbType DESCR : The type. EXAMPLES: - CODE : ex_cpp_mixed_get_type @@ -68,22 +57,21 @@ CATEGORIES: - g_mixed_get_date: - g_mixed_get_string: - g_mixed_get_binary: - NAMES : get_* - SUMMARY : &g_mixed_get_value_summary - Get value of Mixed variable. - DESCR : &g_mixed_get_value_descr - The value of a Mixed typed variable is retrieved by this method. + NAMES : get* + SUMMARY : *g_mixed_get_value_summary + DESCR : *g_mixed_get_value_descr SIGNATURE: | - bool get_bool() const; - int64_t get_int() const; - std::time_t get_date() const; - float get_float() const; - double get_double() const; - const char* get_string() const; - BinaryData get_binary() const; + (BOOL)getBool + (int64_t)getInt + (time_t)getDate + (float)getFloat + (double)getDouble + (NSString *)getString + (TightdbBinary *)getBinary + (TightdbTable *)getTable CONST : True RETURN: - TYPES : [bool, int64_t, float, double, time_t, const char*, BinaryData] + TYPES : [bool, int64_t, float, double, time_t, NSString, TightdbBinary, TightdbTable] DESCR : The value. EXAMPLES: - CODE : ex_cpp_mixed_get_value diff --git a/doc/ref/data/reference.yaml b/doc/ref/data/reference.yaml index 6c7e8be544..6230587be4 100644 --- a/doc/ref/data/reference.yaml +++ b/doc/ref/data/reference.yaml @@ -40,24 +40,24 @@ DESCR : > and environments. For multi-threaded or multi-process applications, you can use the {@link class_shared_group}. -IMPORT : [reference, typed_table_ref, dyn_table_ref, dyn_query_ref, group_ref, typed_view_ref, dyn_view_ref, shared_group_ref, typed_query_ref] +IMPORT : [reference, typed_table_ref, dyn_table_ref, dyn_query_ref, group_ref, typed_view_ref, dyn_view_ref, shared_group_ref, typed_query_ref, mixed_ref] IMPORTPATH: ../../tightdb/doc/ref_cpp/data CATEGORIES: # list global class-id in order of appearence -#- Typed Table: # Category header name -# - typed_table # Global Class name. File: 'typed_table_ref.yaml' -# - typed_view -# - typed_query -#- Dynamic Table: -# - dyn_table -# - dyn_view -# - dyn_query -#- Collection: -# - group -# - shared_group -#- Helpers: -# - mixed +- Typed Table: # Category header name + - typed_table # Global Class name. File: 'typed_table_ref.yaml' + - typed_view + - typed_query +- Dynamic Table: + - dyn_table + - dyn_view + - dyn_query +- Collection: + - group + - shared_group +- Helpers: + - mixed # - cursor EXAMPLES : diff --git a/doc/ref/data/typed_table_ref.yaml b/doc/ref/data/typed_table_ref.yaml index d7e4e9e7ea..feb830d61d 100755 --- a/doc/ref/data/typed_table_ref.yaml +++ b/doc/ref/data/typed_table_ref.yaml @@ -1,14 +1,14 @@ # # Obj-C reference documentation for TypedTable class # - -#UNIMPLEMENTED columns(), front(), back(), insert_empty_row(), lookup(), findAll() via table Propery, get_sorted_view(), where(), distinct() -#INCONSISTENCY add.., addRow, vs. add_empty_row, and number of rows cannot be specified -#INCONSISTENCY popBack(), find_first_* ->> find* ("first" is omitted) + +#UNIMPLEMENTED columns(), front(), back(), insert_empty_row(), lookup(), findAll() via table Propery, get_sorted_view(), where(), distinct() +#INCONSISTENCY add.., addRow, vs. add_empty_row, and number of rows cannot be specified +#INCONSISTENCY popBack(), find_first_* ->> find* ("first" is omitted) ID : class_typed_table TITLE : Table (typed) -SUMMARY : *g_typed_table_summary +SUMMARY : *g_typed_table_summary DESCR : *g_typed_table_descr SEE : EXAMPLES: @@ -67,8 +67,8 @@ CATEGORIES: - g_typed_table_is_empty: NAMES : isEmpty DESCR : *g_typed_table_is_empty_descr - SUMMARY : *g_typed_table_is_empty_summary - SIGNATURE: | + SUMMARY : *g_typed_table_is_empty_summary + SIGNATURE: | (BOOL)isEmpty; CONST : true RETURN: @@ -76,42 +76,42 @@ CATEGORIES: DESCR : *g_typed_table_true_false EXAMPLES: - CODE : ex_cpp_type_table_is_empty - DESCR : + DESCR : - g_typed_table_size: NAMES : count DESCR : *g_typed_table_size_descr - SUMMARY : *g_typed_table_size_summary - SIGNATURE: | + SUMMARY : *g_typed_table_size_summary + SIGNATURE: | (size_t)count RETURN: TYPES : size_t DESCR : Number of rows in table. EXAMPLES: - CODE : ex_cpp_type_table_size - DESCR : + DESCR : - Table: METHODS: - g_typed_table_clear: NAMES : clear SUMMARY : *g_typed_table_clear_summary - DESCR : *g_typed_table_clear_descr - SIGNATURE: | + DESCR : *g_typed_table_clear_descr + SIGNATURE: | (void)clear; EXAMPLES: - CODE : ex_cpp_typed_table_clear - DESCR : + DESCR : - g_typed_table_optimize: NAMES : optimize SUMMARY : *g_typed_table_optimize_summary - DESCR : *g_typed_table_optimize_descr - SIGNATURE: | - (void)optimize + DESCR : *g_typed_table_optimize_descr + SIGNATURE: | + (void)optimize - g_dyn_table_opertator==: NAMES : isEqual SUMMARY : *g_typed_table_operator_eq_summary - DESCR : *g_typed_table_operator_eq_descr - SIGNATURE: | - (BOOL)isEqual:(TightdbTable *)other + DESCR : *g_typed_table_operator_eq_descr + SIGNATURE: | + (BOOL)isEqual:(TightdbTable *)other PARAMS: - NAME : other TYPES : TightdbTable @@ -121,16 +121,16 @@ CATEGORIES: DESCR : true if the two tables are equal, false otherwise. EXAMPLES: - CODE : ex_cpp_dyn_table_operator== - DESCR : + DESCR : - Rows: - METHODS: + METHODS: - g_typed_table_add: NAMES : add* SIGNATURE: | RowAccesor add(value, ...) SUMMARY : Add new row. - DESCR : This method adds a new row to a typed table.

    The method is made available by a macro based on the table definition {@link g_typed_table_macros}. Note that the method name includes specific column names defined in the table definition. E.g. "CName1" will be replaced by the name of the first column in your table and so forth. Please refer to the example below. - SIGNATURE: | + DESCR : This method adds a new row to a typed table.

    The method is made available by a macro based on the table definition {@link g_typed_table_macros}. Note that the method name includes specific column names defined in the table definition. E.g. "CName1" will be replaced by the name of the first column in your table and so forth. Please refer to the example below. + SIGNATURE: | (void)addCName1:(CType1*)value1 CName2:(CType2*)value2 CName3:(CType3*)value3 PARAMS: - NAME : "value1, value2, value3, …" @@ -138,12 +138,12 @@ CATEGORIES: DESCR : Values for all columns in the row. EXAMPLES: - CODE : ex_cpp_typed_table_add - DESCR : + DESCR : - g_typed_table_add_empty_row: NAMES : addRow SUMMARY : This method will add one or more empty rows at the end of the table. DESCR : Add an empty row. - SIGNATURE: | + SIGNATURE: | (size_t)addRow EXAMPLES: - CODE : ex_cpp_typed_table_add_empty_row @@ -183,7 +183,7 @@ CATEGORIES: SIGNATURE: (void)removeLast EXAMPLES: - CODE : ex_cpp_typed_table_remove_last_row - DESCR : + DESCR : - Searching: METHODS: - g_find_first_bool: @@ -193,7 +193,7 @@ CATEGORIES: - g_find_first_date: - g_find_first_string: NAMES : find* - SUMMARY : *g_find_first_xxx_summary + SUMMARY : *g_typed_table_find_first_xxx_summary DESCR : The method finds the first occurence of a given value in a column.

    This method is automatically made available by a macro taking as input the table definition {@link g_typed_table_macros}. The method can only be accessed through a property of the table object. The property CName represents the column to be searched. The type of value must correspond type of the column being accessed. Refer also to the example below. SIGNATURE: | .CName (size_t)find: (CType*)value From 736a1c18d1d75f3524fd3032881204bf7ff86c39 Mon Sep 17 00:00:00 2001 From: Jesper Jepsen Date: Fri, 31 May 2013 12:34:01 +0200 Subject: [PATCH 9/9] cleaned up tutorial --- .gitignore | 4 +- doc/css.css | 24 - doc/logo200.png | Bin 7727 -> 0 bytes doc/main.css | 3619 ------------------ doc/main.js | 106 - doc/prettify.css | 52 - doc/prettify.js | 1477 ------- doc/ref/data/dyn_table_ref.yaml | 2 +- doc/ref/data/typed_table_ref.yaml | 2 +- doc/ref/examples/ex_objc_typed_table_intro.m | 32 + doc/reference.html | 1791 --------- doc/{ => tutorial}/overlay.txt | 8 + doc/tutorial/tutorial.m | 1 + doc/tutorial_short_objc.html | 356 -- doc/tutorial_short_objc_files/ga.js | 56 - {doc => examples}/tutorial.m | 0 16 files changed, 45 insertions(+), 7485 deletions(-) delete mode 100644 doc/css.css delete mode 100644 doc/logo200.png delete mode 100644 doc/main.css delete mode 100644 doc/main.js delete mode 100644 doc/prettify.css delete mode 100644 doc/prettify.js create mode 100644 doc/ref/examples/ex_objc_typed_table_intro.m delete mode 100755 doc/reference.html rename doc/{ => tutorial}/overlay.txt (80%) create mode 120000 doc/tutorial/tutorial.m delete mode 100644 doc/tutorial_short_objc.html delete mode 100644 doc/tutorial_short_objc_files/ga.js rename {doc => examples}/tutorial.m (100%) diff --git a/.gitignore b/.gitignore index 1d43fb800c..2672302273 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ *~ - +.DS_Store # Test output /employees.tightdb /table_test.tbl -/doc/ref/*.html \ No newline at end of file +/doc/ref/*.html diff --git a/doc/css.css b/doc/css.css deleted file mode 100644 index 910e39b00f..0000000000 --- a/doc/css.css +++ /dev/null @@ -1,24 +0,0 @@ -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 600; - src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('https://themes.googleusercontent.com/static/fonts/opensans/v5/MTP_ySUJH_bn48VBG8sNSqRDOzjiPcYnFooOUGCOsRk.woff') format('woff'); -} -@font-face { - font-family: 'Open Sans'; - font-style: italic; - font-weight: 600; - src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url('https://themes.googleusercontent.com/static/fonts/opensans/v5/PRmiXeptR36kaC0GEAetxuw_rQOTGi-AJs5XCWaKIhU.woff') format('woff'); -} -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 700; - src: local('Open Sans Bold'), local('OpenSans-Bold'), url('https://themes.googleusercontent.com/static/fonts/opensans/v5/k3k702ZOKiLJc3WVjuplzKRDOzjiPcYnFooOUGCOsRk.woff') format('woff'); -} -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 400; - src: local('Open Sans'), local('OpenSans'), url('https://themes.googleusercontent.com/static/fonts/opensans/v5/cJZKeOuBrn4kERxqtaUH3bO3LdcAZYWl9Si6vvxL-qU.woff') format('woff'); -} diff --git a/doc/logo200.png b/doc/logo200.png deleted file mode 100644 index 27b3fca03b645fc61a3f41f4d90759e5803f738e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7727 zcmW+*byQSe7kvoA&>hz-5nB2OG-CLH%Li`bR!_$Eg(5G-~7J4)_rHa zzuvv4?%wA`eNdG{Mryo&h9qOE?@;IDX@#1vz4ubB>?y==V)4MX&&K=K-aG&l_G<`DLHH4 zfxsG)F~PWrw2TzUSc;Jp1xtA9z1T7`2*ktrk??VG!LfMi%xKXle~@-53gg0xBBMti zxBQFj7doK(6E97Rq6bx1IgL|DJs`AHc`kLHV6<{cGVIN;p@G4zT~_fB6lxa$3)E;q z;r>ho2iye-3o}vnAawz7K69ubphqREhn*zi74uj!!w4?;GhB~HBEJ$S7#9%ti<2w? z#AV@vbJA%wfqVqObj%#G1AJfsOzA%D&jG8Bo=A|073)U)g!+!00{no=`aeX9zdu=G8a= zjA6oZ+>Q8334!dq>`hg=hy%cuN6^d*Gg~83un=Of<4YmU z8G_A6)O=59j8y}scoUF+w5)sO@}F;H3KH6umiBgc|0oVf8k&vj2EJJLne^yBJKP5e zKS6IcySAxAIE_Q(5bien#;=u&Nv4vJKSNgc=OP+y-&=O_mhAZ>b#xI5}Nu5r?t zu~(eMlu?pN48Le*UoEybm>=OqH+X5OKkLFazcG z(szU)BS;K`-kDJ>N5Vm(^{C=N1Q}oMD0<})aAK&zBayi3luC&_@*En`T3~H?(n}Gy zHv$nxvOg1rh5^pdr|=Frj&C6i>LS0#6>cF9VZMb7L2*1rpyu95ZFL%YY#nsVy~r;sisZq&W;_)9i|<^UwfmW zhvS6}MOxFp&mu%3w0`eRSevd~@_sJn{g4(rAIC}hK?Y`qv$h^%Gh+Z=;wVarVhU{v zF(aE+c|}RZdIhTXmG+oceECPsz#3U?F3p{CbVA}XxQoVCQh z2kAdYA?o)l_p3>LSI@6E+36Srqnf{O^kJs3N3RU`4B;7|t)Ey5@M3IFeAltLnv*SbQjU1XDVj~(g;tJX%q3|yrS7%{TwxN{^ zbt&V1aj9an6tlFg&xvg_!bS74Uu7|4Z3m5ZsCOI(9S4hO5osxCl~j&Z&N4Mr+DaHo zgp`GphbG1+3MUpac(Oz|7C8^H4zd=rHd;&#d<>YI%bHs)6&iL8O7zc~JDk242t9QZTv>$3A z-#p&=1yFRyi3zS)-Zm_qO2p>3N#IGuhgOH~^;T2Z4F652rhp!#PbN;(;tLJ_a)+sZn#*SOQasr3`ZJ|_spu4`-b#`bgJ}vmNkc(KrM?R52I)WtDW#N z-%swJVuP$!`s4F@IeH2XN+bfTj5WMY4qY2hr&kf%Ioqf^{sif4!^SSY1(SW(UrO=I zS#g*JQ^l1dRr$aDlfYsu!;hu8eCJIQhvM5u+GkD4Hp4p;`A5o#kxcbco>9dw>2G2O zk1zEvu43lBw$F6s2_4Gl%4=DIx%io0U`I|7!A_2_q{IYQ$qEXUwPP)u`0_i z4KKf(Vp`b9QjkXM8xyMD>a(CUOO_mJ8PG2>A~jfB>RNSAM2!lhR^~EIoQ^k+t|ahf zpXa@v;`HHcB{dg^E9tV3>g{({*$FfVyZWx6?BKm+3fDob5^jxdW^|lat31_Bs|o6) z^;5AA`Pe%e+S>$Ye}bxwviBwMWOeb>SWS;jf1}ClAv}jz6fY{e26u%Z4e!$*`cIK8=*Sz$|?pkHYZ zYnEy&>K1P8uq+*!oDdSz`mS}Y^`OOjHoMkjws_|>b4Kjnam)R8e#Ni@`YbxqwW1BD ztuk*lZ~3V3*a#J?iK;ldOMP@Su2yw)JspCdg?~n(!f0M>`#n!OE25{4@aoMo4_fEG}H?vmI#PQhUSokG*PHm_?yFIg}&B(s( z%&)V_-wJv}oXa=4cHQZFf&aQNpDQ4;)_LXU4E+VY*}z{5a-(~m9BW_lraP1aI*+Hl-mBiE=S3TsYP$j8PxP-g_w_fL)1{Be?~{{X5#ZCWp3J#eR$zP+Y%Z^% z0swwAFa{b10QavjdjtTU>;Q0V3IKxX06^fJWb#WE0NxoWNK0t>EdMq3)zj3?>oQEr z`VxqYh0lkOf}f^Vx$rfb#nYj{^PxI z=1rYCZCoX7+@`Wf3WtVT1$i)a+sPAl7TYR~L=yh*#}}DN0cfuKx$n8NP`5i^n~8`3 z`o|64!UJJN(ujjofe^hn2%rHRFqTrVI5XTEVbtCDcF(}T&Jha@#+0tEuII-DQc_YD z7M8zmxH3hBg}K)Z)CwAlR$vegf`mVX%3LG}S>u6&=pFyeLKPB4og4!?0LCIY#*~;2 zrd^n?)WswdzT1fxvuj$ODUzGY74e_QgozTTl1fdDt6|2 z@qA93_-c@Nm)96&7&S~maU{3EMZ~wz6!_2il|@!Y#7749#id8+#7EJ~5T&Z|@$uik zf7jHou1szJAKBU2$#iPBX+FVb>5WFzI3nl6~veN9KPgfka(c#!}rHB#+PEG9jcEx#ZZ4C*N%wzVlIPK%*)z#d| z&EE7p_k2#-;>`Kg)zv?KTrX4`(y8TE!CuPC z;Q%l%@523QI0k8EQj**Cp}N<65{=Sb>|rS~VR-qxU6VmhR+gcjo}QuM%Gw$_(6iiR z|2FFF?%rPK)ufQ6rDd#Jl=SxO>vFSWmQJNe;KPs3>9H~U{%~~XuKRt>S6)|=Jh4wN z<(j4R(U4^lENU#&50&!{IyX3GW@h^O`nokn_xoAS$H&JwI5_*0IYI$<|E#whxA}9E zll!gaxj;^kw)dMMWq)ZP6c9jNW#5AfFS#zXl>@9-b zot;V_VMy`!@88nWR$lheq~U;no4sM`MY0?yYI&j}9)}+ur|z!~+-v?i!8U)f{cBRL zXzr+?u@RG8^y%N0RMCtLXNJSx%gc+Xs32F$jVu95iKk)niVK~yoZBcS;6Kt~J#1w{qq3z=J{heOGj&>8R2R+}Y zEh}?bFa8B#U}3TRw1*a-w1x--FD&RB@QDRI-Nlg#ovpU@EAZ#2wm7ad!-@!&yB;%z zGCVvy*_{JJL(nblTtUy{PUw1NO^uZzYVwE$Cl4?0{{DWAVT;qrLUmBkxHPU|&y*!W zvv@w0oxS}%(V`Ad4*!Gu1v*biGW(klFi0Yy&kzv+;;{W<)K}Io@>?tJ!u^igo%v~b zS}{8p?&8_pop4th4O|dH#6jQkAzF+jw)ta!ROUPklWXq$meL6z1SONm7&qQ3%(ya- zHYGQ|;{)nh5w-$@(E6JlmKyw_PNCpzsJ5|jr_aT9WF&~3oLtQ|duJ$~&9Hf#mGr*O zdW!6;to!AzLU_*RZd-QP)Ou^`r-MJb0xVw*v>46kNX6L^dI6vZl32F+)>OBb|oh# zr%}Ub9H!V)-S_VU&q0=)OE)KrX>2BEN!q--ySpx|j6PW2&URhOVl(Tr6e$;(_T6ec z;FJQH?$yVY*IWwFsLBNsq| z@Et;lO=^`nUIvW-sp>_d97ExnQ^x2AtBrD4)@i&~oC8AMVFY4luk00bj)b+R=x-Ri z6rkK!siwJDuXPm`LUsnfsuD@d$|@FXfI{Vyejj<9o}Q9r510H0+LaB)l+m#ttYHxJ?p`ka`cn8H#ki&2e&^Rj^bx3p2 zR#lxcnA6;plG2pkj?7pH)jHej)o#d)lrBl&VJz)@1iUaT`8jT@-W9`Z1cipL0vXB% zK1Y++x`T4@vAZ-2sVs(n%e7==WJ*d!eluzf5a$SrsJ^O?LX3@1{F-ED?_ z`-ba3+96vc;Ii4%8;0aK_A@tBnRcZs@bT&X%5j8%TH)p4q}G0+YU|n&Idphr#FcvC z8-r%Ey3pV4HFWFX`a~ZNsnjNH^!1nO&4>6aX_eDm{{G<@ zR7N8g4Opx(hK0wl$xhqax>Rm3{{wy3<5~Oeu7y7`TK`j6)KR1 zfl;|V-yPCJYjgcwtp1c$<=(-;iH9HtRGJdze;`cTi`l5v1=a_1iTYtFOsa1=RA<(o z%B<$uLFwl}C?B3e>J9~x;%?dmg4A(evkZG7Y)mNbRNqfsiL zq(tdD_{6aIJAmRfCJj>&sMu9*4wa~7kI9;C6v;5aJ0e0tS&hOhEEDR8b@gt0qp%|S zDHaSv3X|^Tyc^Esz92uc#0`22s!}z6EVgn>dbO*0gi88Db}}j*O)MD~2mTO<4@ul~ zz~o~rF}B!%Le_=mHlkc5DAh#*OK;JMkbZ!Z5Y791-7?MJ-+wAcXz{)Yc7IHXy>>jB ze_%}E;NVcT89Ms+4q@v;c;~nQG1|fj4L3@LZIWci?RDJUya>6k`eK?J#&9&Pzk1s4 zsAXfTZBjEOAbWXvVB$hxecAOvGYk>kjkU(XlsW#IgPJ~(U%^hB9yef%gaEr_2*K*t z#2UV=3Ac=rWm5V9VjJ(f&ONl7-!1$)Ha-bsRw2Dz4o#>MABum*sjoW^RMghC=rR9w zV`HmbuYwa+LBjU(^di1CcEIUpr`DB!{jLiay8Y1yz$qs*y+M>P)s%V^r_hm*fV2KB z&Y1FMiqL?#i3jg1np!R*01CBm8_DC1UB~*y2A;y0x+Si^^O)xHp=AVxVj*01d=25z zik3TQ_}URfrE{)}_=><(+HDHneb_F+cfm_@c7qmkZ+QYxg&@LzyYnPCJujHQkhb{Z~e@Tv$6!Zz#t7=Pu7#@^05q3 zw|%`XiACg_zodUIW zKin0#2awB}z2uCEtwF3c5^(X}5qwdk>7-oP9Z3!g3tQUr>wH=B-taWKa)!}2cS#Km z4IC3cCqF+wJ3BjV?G$q}Tic_bo+sG{&Nplya05@97Wpf0&o^HCF~#^%tmF!a-|^9d zhtn+X!^@Q2p3~a>Ur)}Pv{mBv5Ce5@y?sprUqq~at>Wr>4euWAso|_RYMG3|8~+G#1d04(VRZb}L(Kd^O~Y2oE2%;B;EbO5<}}{((&;8w|E-GB`Ot zhS9m4s#bws*yi88d*|-%E@1B%p)xo)xGY&>)!5eB>eFK<-u@kSe@tSq6Mc=rXL;C; zVZ%jvE29o0;89Ugx9Bn`Z2EnFFNV5CEo;#fEf1?Jp-l5liBgiqZnyw|LuZ)fIiHEB zMJpi(1JeXBit(vk0}qc`;uo*V;==dJa))p7G?9@@G4rt#*<2g}2@Nd+ zmr!VYOpO2CKMHF{7+1HnEPl)t3k9#VII}S_ZWk#9{s)nv7Mf&VUtiZ;-Ia4fu^?fz z{_NDUUywGBqoij#b1C)hljNXIm-gnL`lA|5I9jWgf4elbZf#Vs5U>%F7|7a0;d;9s zyow&Nk>1c@VN<3kcsPbH&{j*C)P0>+*3qv!OjNJ!&gpT)`RCaP`4#;!S8z8jlw8E` zM{=iUfL?cyNM7K=xxBo*OVaevT@7KTjoC3txw0e{Nv{TBh04Zu0EX5A+ZJ%7v56cFc9EUUd;dSk`LBb%+kn8t(2GWFH{Ui<8qYS*Y7?z9KuDBttpeY;}X)U#dL0#yFR6Ku+_ZHfS7_+448U`(2>R}fK z|6x1bAn0H}6{vjQFVJ3MGaj8KI5G81<2PqLHl*s7YJbFBSE5l4Q&Zl%!-<{#P&;m- zaF(~B`SR36LS7C&KCR|$Myv;DdOG3Ik+Q0)moWFVs2Qvt9GuJu2QwbuN+d`Y zxZoV`DrtEq!4HeW+BOVkW(BfEa6r${koEp}229J&%*;qgu;QG!#M)FjI@-_JE0TE~ z3YsAhiBRzJbA!1lr#YOYalX$-bFmm_B2q+7utXPDTQS*p#v=k)Dbc5V^&W;N_6Edu zne#N5$gv+P-W1A7zm0fc>VH$Pe)pocuYt*x!tCdov31c`)+n_}BcYK641#7F44nu-cuiTkE0IP)j#D;_SqkoOs` z9u3x5KTOBNq8G-V7^*ugorl?;$!R$X<2uZBieUV-9_fTHs04!gx@PdS