Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ref doc methods and example added. Develop is merged into this branch #109

Merged
merged 24 commits into from
Sep 12, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,6 @@ tightdb-java-test/testng.xml
# Ref doc generated classes

doc/ref/examples/generated/com/tightdb/refdoc/*.java

# generated json output in ref doc json example
doc/ref/examples/fromServlet
9 changes: 9 additions & 0 deletions doc/changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
09-September-2013:
=================
+ Added Table.toString(), Table.toString(maxRows)
+ Added TableView.toString(), TableView.toString(maxRows),
+ Added Group::toString(), toJson(), equals()
+ Added Mixed.getReadableValue()
+ Added SharedGroup::hasChanged
+ Added validation of parameters in all methods. Exceptions are now thrown if invalid parameters are passed.

06-September-2013:
=================
! BUGFIX: Fixed small leak in TableQuery.
Expand Down
2 changes: 1 addition & 1 deletion doc/ref/data/dyn_table_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ CATEGORIES :
- Table:
METHODS:
- g_dyn_table_is_attached:
NAMES : isValid
NAMES : isAttached
SUMMARY : *g_dyn_table_is_attached_summary
DESCR : *g_dyn_table_is_attached_descr
RETURN:
Expand Down
20 changes: 20 additions & 0 deletions doc/ref/data/group_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,26 @@ CATEGORIES:
EXAMPLES:
- DESCR :
CODE : ex_java_group_write_to_mem
- g_group_to_string:
NAMES : toString
DESCR : *g_group_to_string_descr
SUMMARY : *g_group_to_string_summary
RETURN:
DESCR : String summary of the Group
TYPES : String
EXAMPLES:
- DESCR :
CODE : ex_java_group_to_string
- g_group_to_json:
NAMES : toJson
DESCR : *g_group_to_json_descr
SUMMARY : *g_group_to_json_summary
RETURN:
DESCR : JSON representation of the Group
TYPES : String
EXAMPLES:
- DESCR :
CODE : ex_java_group_to_json

- Group:
METHODS:
Expand Down
2 changes: 1 addition & 1 deletion doc/ref/data/reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ 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_view
# - typed_query
- Dynamic Table:
- dyn_table
Expand Down
13 changes: 13 additions & 0 deletions doc/ref/data/shared_group_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,16 @@ CATEGORIES:
EXAMPLES:
- CODE : ex_java_shared_group_begin_read
DESCR :

- Shared group:
METHODS:
- g_shared_group_has_changed:
NAMES : hasChanged
SUMMARY : *g_shared_group_has_changed_summary
DESCR : *g_shared_group_has_changed_descr
RETURN:
TYPES : boolean
DESCR : <code>true</code> if it has changed, <code>false</code> otherwise.
EXAMPLES:
- CODE : ex_java_shared_group_has_changed
DESCR :
193 changes: 78 additions & 115 deletions doc/ref/data/typed_table_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CATEGORIES :
TYPES : long
DESCR : *g_dyn_table_get_xxx_parm1_descr
EXAMPLES:
- CODE : ex_java_dyn_table_set_index
- CODE : ex_java_typed_table_set_index
DESCR :
- g_typed_table_has_index:
NAMES : hasIndex
Expand All @@ -107,7 +107,7 @@ CATEGORIES :
TYPES : boolean
DESCR : <code>true</code> if column is indexed, <code>false</code> otherwise.
EXAMPLES:
- CODE : ex_java_dyn_table_has_index
- CODE : ex_java_typed_table_has_index
DESCR :

# TODO: add
Expand All @@ -126,6 +126,80 @@ CATEGORIES :
# DESCR :


- Columns:
METHODS:


- g_typed_table_get_column_count:
NAMES : getColumnCount
SUMMARY : *g_dyn_table_get_column_count_summary
DESCR : *g_dyn_table_get_column_count_descr
RETURN:
TYPES : long
DESCR : *g_dyn_table_get_column_count_return_descr
EXAMPLES:
- CODE : ex_java_typed_table_get_column_count
DESCR :
- g_typed_table_get_column_name:
NAMES : getColumnName
SUMMARY : *g_dyn_table_get_column_name_summary
DESCR : *g_dyn_table_get_column_name_descr
PARAMS:
- NAME : columnIndex
TYPES : long
DESCR : *g_dyn_table_get_column_name_param1_descr
RETURN:
TYPES : String
DESCR : *g_dyn_table_get_column_name_return_descr
EXAMPLES:
- CODE : ex_java_typed_table_get_column_name
DESCR :
- g_typed_table_get_column_index:
NAMES : getColumnIndex
SUMMARY : *g_dyn_table_get_column_index_summary
DESCR : *g_dyn_table_get_column_index_descr
PARAMS:
- NAME : columnName
TYPES : String
DESCR : The name of the column to find.
RETURN:
TYPES : long
DESCR : The column index or -1 if there is no column with the specified name.
EXAMPLES:
- CODE : ex_java_typed_table_get_column_index
DESCR :
- g_typed_table_get_column_type:
NAMES : getColumnType
SUMMARY : *g_dyn_table_get_column_type_summary
DESCR : >
This method returns the type of a column using the column index. Currently,
the following types are supported from the <code>ColumnType</code> class:
<ul>
<li><code>BOOLEAN</code></li>
<li><code>LONG</code></li>
<li><code>FLOAT</code></li>
<li><code>DOUBLE</code></li>
<li><code>STRING</code></li>
<li><code>BINARY</code></li>
<li><code>DATE</code></li>
<li><code>TABLE</code></li>
<li><code>MIXED</code></li>
</ul>
PARAMS:
- NAME : columnIndex
TYPES : long
DESCR : The column index.
RETURN:
TYPES : ColumnType
DESCR : The column type.
EXAMPLES:
- CODE : ex_java_typed_table_get_column_type
DESCR :





- Rows:
METHODS:
- g_typed_table_operator_brackets:
Expand Down Expand Up @@ -176,118 +250,7 @@ CATEGORIES :

- Searching:
METHODS:
# TODO: Add lookup()
# - g_dyn_table_lookup:
# NAMES : lookup
# SUMMARY : *g_dyn_table_lookup_summary
# DESCR : *g_dyn_table_lookup_descr
# PARAMS:
# - NAME : value
# TYPES : String
# DESCR : The value to search for.
# RETURN:
# TYPES : long
# DESCR : The row index or -1 if there is no match.
# EXAMPLES:
# - CODE : ex_java_dyn_table_lookup
# DESCR :
- g_dyn_table_find_first_int:
- g_dyn_table_find_first_float:
- g_dyn_table_find_first_double:
- g_dyn_table_find_first_bool:
- g_dyn_table_find_first_date:
- g_dyn_table_find_first_string:
NAMES : [findFirstLong, findFirstFloat, findFirstDouble,
findFirstBoolean, findFirstDate, findFirstString]
TITLE : findFirst*
SUMMARY : *g_dyn_table_find_first_xxx_summary
DESCR : *g_dyn_table_find_first_xxx_descr
SIGNATURE: |
long findFirstLong(long columnIndex, long value)
long findFirstFloat(long columnIndex, float value)
long findFirstDouble(long columnIndex, double value)
long findFirstBoolean(long columnIndex, boolean value)
long findFirstDate(long columnIndex, Date value)
long findFirstString(long columnIndex, String value)
PARAMS:
- NAME : columnIndex
TYPES : long
DESCR : *g_dyn_table_find_first_xxx_parm1_descr
- NAME : value
TYPES : [long, float, double, boolean, Date, String]
DESCR : *g_dyn_table_find_first_xxx_parm2_descr
RETURN:
TYPES : long
DESCR : The row index or -1 if there is no match.
EXAMPLES:
- CODE : ex_java_dyn_table_find_first_xxx
DESCR :
- g_dyn_table_find_all_int:
- g_dyn_table_find_all_float:
- g_dyn_table_find_all_double:
- g_dyn_table_find_all_bool:
- g_dyn_table_find_all_date:
- g_dyn_table_find_all_string:
NAMES : [findAllLong, findAllFloat, findAllDouble,
findAllBoolean, findAllDate, findAllString]
TITLE : findFAll*
SUMMARY : *g_dyn_table_find_all_xxx_summary
DESCR : *g_dyn_table_find_all_xxx_descr
SIGNATURE: |
TableView findAllLong(long columnIndex, long value);
TableView findAllFloat(long columnIndex, float value);
TableView findAllDouble(long columnIndex, double value);
TableView findAllBoolean(long columnIndex, boolean value);
TableView findAllDate(long columnIndex, Date value);
TableView findAllString(long columnIndex, String value);
PARAMS:
- NAME : columnIndex
TYPES : long
DESCR : *g_dyn_table_find_all_xxx_parm1_descr
- NAME : value
TYPES : [long, float, double, boolean, Date, String]
DESCR : *g_dyn_table_find_all_xxx_parm2_descr
RETURN:
TYPES : TableView
DESCR : *g_dyn_table_find_all_xxx_return_descr
EXAMPLES:
- CODE : ex_java_dyn_table_find_all_xxx
DESCR :

# - g_dyn_table_get_sorted_view:
# NAMES : get_sorted_view
# SUMMARY : *g_dyn_table_get_sorted_view_summary
# DESCR : *g_dyn_table_get_sorted_view_desc
# SIGNATURE: |
# TableView get_sorted_view(long columnIndex, bool ascending=true);
# ConstTableView get_sorted_view(long columnIndex, bool ascending=true) const;
# PARAMS:
# - NAME : columnIndex
# TYPES : long
# DESCR : The column index (starting from 0).
# - NAME : ascending
# TYPES : boolean
# DESCR : *cpp_dyn_table_get_sorted_view_param
# RETURN:
# TYPES : TableView
# DESCR : A view.
# EXAMPLES:
# - CODE : ex_java_dyn_table_get_sorted_view
# DESCR :
- g_dyn_table_distinct:
NAMES : distinct
SUMMARY : *g_dyn_table_distinct_summary
DESCR : *g_dyn_table_distinct_desc
PARAMS:
- NAME : columnIndex
TYPES : long
DESCR : *g_dyn_table_distinct_parm1_desc
RETURN:
TYPES : "{@link class_dyn_tableview}"
DESCR : *g_dyn_table_distinct_return_desc
EXAMPLES:
- CODE : ex_java_dyn_table_distinct
DESCR :
#
- g_dyn_table_where:
# - g_dyn_table_where_const:
NAMES : where
Expand All @@ -298,7 +261,7 @@ CATEGORIES :
DESCR : *g_dyn_table_where_return_descr
EXAMPLES:
- DESCR :
CODE : ex_java_dyn_table_where
CODE : ex_java_typed_table_where


- Dump:
Expand Down
Loading