Skip to content

Commit

Permalink
Removing extraneous trailing white-space
Browse files Browse the repository at this point in the history
  • Loading branch information
kspangsege committed Dec 7, 2013
1 parent cca71f1 commit a22166b
Show file tree
Hide file tree
Showing 32 changed files with 487 additions and 487 deletions.
12 changes: 6 additions & 6 deletions doc/api_review.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Add row should return a curser instead of an index for consistency with the type

-(size_t)addRow; ((TightdbCurser*)addRow)
-(BOOL)remove:(size_t)ndx; (removeRowAtIndex:)

Insert row is missing (edit: appears to be added in ErrorBranch, returning BOOL).
-(TightdbCurser *)insertRowAtIndex:

-(TightdbCurser *)insertRowAtIndex:
-(int64_t)sumInt:(size_t)colNdx; (sumOfIntColumn:)

Typed Query
Expand Down Expand Up @@ -68,7 +68,7 @@ Suggested (here, concrete syntax):

[table addColumnWithType:tightdb_String andName:@"Name"];

Comment from Alexander was that signatures with "With" should occur only when there are corrosponding method(s) without "With", and since we have no addColumn method without arguments, we don't comply with that suggested rule:
Comment from Alexander was that signatures with "With" should occur only when there are corrosponding method(s) without "With", and since we have no addColumn method without arguments, we don't comply with that suggested rule:

There are many examples in Apples API where the rule does not apply, for instance in NSArray:

Expand All @@ -87,9 +87,9 @@ Difficulty 1 (hardest, relatively speaking):

Difficulty 2:
- Add missing methods in Typed API (there are not so many missing here).
- Update signature naming in Typed API (sligtly more difficult due to nested macros).
- Update signature naming in Typed API (sligtly more difficult due to nested macros).

Difficulty 3:
Difficulty 3:
- Add missing methods, many of them in dynamic query.
- Update signature naming in Dynamic API.

Expand Down
14 changes: 7 additions & 7 deletions doc/memo1.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Objective-C Typed API: Capitalizaiton in signature names
========================================================

This document describes issues and solutions related signature naming in the typed Objective-C interface. The overall challenge is that classes are defined with macros, which cannot modify case (capitalization) in the column names the user supplies in the table definition.
This document describes issues and solutions related signature naming in the typed Objective-C interface. The overall challenge is that classes are defined with macros, which cannot modify case (capitalization) in the column names the user supplies in the table definition.

Background
----------
Expand All @@ -15,7 +15,7 @@ Examples #1 (adding a row and setting multiple values with a single setter):

Table: Name, String
Age, Int

[table addName:@”Bob” Age:10];

Table: name, String
Expand All @@ -27,28 +27,28 @@ Problem #1: The latter signature should in Objective-C notation have been “add

Decision #1: Due to above problem, we decided to avoid prefixes before column names. It apparently has the direct consequence that we cannot create methods, which sets multiple values at once and where the first parameter is a column (how should the signature be named?).

Decision #2: Based on decision #1 we decided to only use (overridden) property getters/setters for accessing and only set one property at the time.
Decision #2: Based on decision #1 we decided to only use (overridden) property getters/setters for accessing and only set one property at the time.


Examples #2 (using property getters/setters):
---------------------------------------------

Table: name, String
age, Int

Curser *c = [table add]; // adds a row and returns the curser for it
[c setAge] // synthesized setter
[c setage] // custom setter

Problem #2: At the time of writing we generate a custom setter setage, which accesses the database. On top of that setAge is automatically synthesized and does not access the database – only the property named age (not wanted).

Problem #3: We can disable the synthesised setter, but we cannot create a custom setter with capital A in the name.

Decision #3: Only allow dot notation. Example code below. The getter and setter methods have names, which are so weird that they will never be called directly – only via the property.
Decision #3: Only allow dot notation. Example code below. The getter and setter methods have names, which are so weird that they will never be called directly – only via the property.

@property (getter = _private_age, setter = _private_setage:) NSString *age;

-(NSString*)_private_age {
-(NSString*)_private_age {
return @"Getting a value from the database";
}

Expand Down
2 changes: 1 addition & 1 deletion doc/memo2.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Conclusion
----------
While it's possilbe to add methods dynamically, they cannot be called without ugly looking syntax (with ARC). In our case this syntax is not useful. Disabling ARC is not an option. Apple has responded on a blog to an inquery about why the methods cannot be called directly after ARC.

"Our reasoning was split about 50/50 between (1) needing to be more careful about types and ownership and (2) wanting to eliminate an embarrassing wart in the language (not being allowed to complain about completely unknown methods with anything more strenuous than a warning). There is really no legitimate reason to call a method that's not even declared somewhere. The ability to do this makes some really trivial bugs (e.g. typos in selectors) runtime failures instead of compile failures. We have always warned about it. Fix your code."
"Our reasoning was split about 50/50 between (1) needing to be more careful about types and ownership and (2) wanting to eliminate an embarrassing wart in the language (not being allowed to complain about completely unknown methods with anything more strenuous than a warning). There is really no legitimate reason to call a method that's not even declared somewhere. The ability to do this makes some really trivial bugs (e.g. typos in selectors) runtime failures instead of compile failures. We have always warned about it. Fix your code."
18 changes: 9 additions & 9 deletions doc/ref/data/dyn_query_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## 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++.
## !! Do we at all have a dynamic query interface?
## !! Do we at all have a dynamic query interface?
## !! All the Conditions don't take a colIndex...
## All the Combiners return (void) - don't they return TightdbQuery ? - check-&-fix

Expand Down Expand Up @@ -62,7 +62,7 @@ CATEGORIES :
- (TightdbQuery *)column:(size_t)colNdx isEqualToString:(NSString *)value
- (TightdbQuery *)column:(size_t)colNdx isEqualToString:(NSString *)value caseSensitive:(bool)caseSensitive
- (TightdbQuery *)column:(size_t)colNdx isEqualToDate:(time_t)value
- (TightdbQuery *)column:(size_t)colNdx isEqualToBinary:(TightdbBinary *)value
- (TightdbQuery *)column:(size_t)colNdx isEqualToBinary:(TightdbBinary *)value
SUMMARY : *g_dyn_query_equals_summary
DESCR : *g_dyn_query_equals_descr
PARAMS:
Expand Down Expand Up @@ -189,7 +189,7 @@ CATEGORIES :
EXAMPLES:
- DESCR :
CODE : ex_objc_dyn_query_greaterThanOrEqual

- g_dyn_query_lessThan_integer:
NAME : "isLessThanInt:"
- g_dyn_query_lessThan_float:
Expand Down Expand Up @@ -249,7 +249,7 @@ CATEGORIES :
EXAMPLES:
- DESCR :
CODE : ex_objc_dyn_query_lessThanOrEqual

- g_dyn_query_between_integer:
NAME : "isBetweenInt:"
- g_dyn_query_between_float:
Expand Down Expand Up @@ -346,7 +346,7 @@ CATEGORIES :
- g_dyn_query_contains_binary:
TODO : soon
- g_dyn_query_contains_string:
NAME : contains
NAME : contains
TODO : soon
- g_dyn_query_contains_string_2:
TODO : soon
Expand Down Expand Up @@ -428,7 +428,7 @@ CATEGORIES :
EXAMPLES:
- DESCR :
CODE : ex_objc_dyn_query_subtable

- g_dyn_query_endSubtable:
NAMES : parent
DESCR : *g_dyn_query_endSubtable_descr
Expand Down Expand Up @@ -473,7 +473,7 @@ CATEGORIES :
CODE : ex_objc_dyn_query_findall

- g_dyn_query_find:
NAMES : find
NAMES : find
DESCR : *g_dyn_query_find_descr
SUMMARY : *g_dyn_query_find_summary
SIGNATURE: |
Expand Down Expand Up @@ -557,7 +557,7 @@ CATEGORIES :
(double)maximumWithDoubleColumn:(size_t)colNdx
PARAMS:
- NAME : colNdx
DESCR : Column index. The datatype of the column must match the function called.
DESCR : Column index. The datatype of the column must match the function called.
TYPES : size_t
RETURN:
TYPES : [int64_t, float, double, time_t]
Expand Down Expand Up @@ -618,7 +618,7 @@ CATEGORIES :
CODE : ex_objc_dyn_query_average

- g_dyn_query_remove:
NAMES : remove
NAMES : remove
DESCR : *g_dyn_query_remove_descr
SUMMARY : *g_dyn_query_remove_summary
SIGNATURE: (NSNumber *)remove
Expand Down
28 changes: 14 additions & 14 deletions doc/ref/data/dyn_table_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ CATEGORIES :
DESCR :

- g_dyn_table_opertator!=:
TODO : soon
TODO : soon
NAME : is???Equal
SUMMARY : *g_dyn_table_operator_neq_summary
DESCR : *g_dyn_table_operator_neq_descr
Expand All @@ -126,7 +126,7 @@ CATEGORIES :
- g_dyn_table_rename_column:
TODO : later


- g_dyn_table_get_column_count:
NAME : getColumnCount
SUMMARY : *g_dyn_table_get_column_count_summary
Expand All @@ -138,7 +138,7 @@ CATEGORIES :
EXAMPLES:
- CODE : ex_objc_dyn_table_get_column_count
DESCR :

- g_dyn_table_get_column_name:
NAME : getColumnName
SUMMARY : *g_dyn_table_get_column_name_summary
Expand Down Expand Up @@ -238,7 +238,7 @@ CATEGORIES :
DESCR : Returns a dynamic cursor at the added row.

- g_dyn_table_insert_empty_row:
NAME : insertRowAtIndex
NAME : insertRowAtIndex
SUMMARY : *g_dyn_table_insert_empty_row_summary
DESCR : *g_dyn_table_insert_empty_row_descr
SIGNATURE: -(TightdbCursor *)insertRowAtIndex:(size_t)ndx
Expand All @@ -257,7 +257,7 @@ CATEGORIES :
# - g_dyn_table_insert_int:
# NAME : insertInt
# - g_dyn_table_insert_enum:
# INGORED : ""
# INGORED : ""
# - g_dyn_table_insert_date:
# NAME : insertDate
# - g_dyn_table_insert_string:
Expand Down Expand Up @@ -322,7 +322,7 @@ CATEGORIES :
EXAMPLES:
- CODE : ex_objc_dyn_table_remove
DESCR :

- g_dyn_table_remove_last_row:
NAME : removeLastRow
SUMMARY : *g_dyn_table_remove_last_row_summary
Expand Down Expand Up @@ -393,7 +393,7 @@ CATEGORIES :
# TYPES : size_t
# DESCR : *g_dyn_table_get_xxx_parm2_descr
#RETURN:
# TYPES : [BOOL, int64_t, float, double, time_t, NSString*, TightdbBinary*,
# TYPES : [BOOL, int64_t, float, double, time_t, NSString*, TightdbBinary*,
# TightdbMixed*, TightdbType, TightdbTable*]
# DESCR : *g_dyn_table_get_xxx_return_descr
#EXAMPLES:
Expand Down Expand Up @@ -443,7 +443,7 @@ CATEGORIES :
# TYPES : size_t
# DESCR : *g_dyn_table_get_xxx_parm2_descr
# - NAME : value
# TYPES : [BOOL, int64_t, float, double, time_t, NSString*, TightdbBinary*,
# TYPES : [BOOL, int64_t, float, double, time_t, NSString*, TightdbBinary*,
# const char*, size_t, TightdbMixed*]
# DESCR : *g_dyn_table_set_xxx_parm3_descr
# - NAME : data
Expand Down Expand Up @@ -508,7 +508,7 @@ CATEGORIES :
EXAMPLES:
- CODE : ex_objc_dyn_table_set_index
DESCR :

- g_dyn_table_has_index:
NAME : hasIndex
SUMMARY : *g_dyn_table_has_index_summary
Expand All @@ -524,8 +524,8 @@ CATEGORIES :
EXAMPLES:
- CODE : ex_objc_dyn_table_has_index
DESCR :


- Searching:
METHODS:
- g_dyn_table_lookup:
Expand Down Expand Up @@ -778,7 +778,7 @@ CATEGORIES :
EXAMPLES:
- CODE : ex_objc_dyn_table_maximum
DESCR :

- g_dyn_table_minimum_int:
- g_dyn_table_minimum_float:
- g_dyn_table_minimum_double:
Expand Down Expand Up @@ -822,8 +822,8 @@ CATEGORIES :
EXAMPLES:
- CODE : ex_objc_dyn_table_average
DESCR :


- Dump:
METHODS:
- g_dyn_table_to_json:
Expand Down
8 changes: 4 additions & 4 deletions doc/ref/data/dyn_view_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CATEGORIES :
- g_dyn_view_get_column_count:
TODO : soon

NAME : getColumnCount
NAME : getColumnCount
SUMMARY : *g_dyn_table_get_column_count_summary
DESCR : *g_dyn_table_get_column_count_descr
RETURN:
Expand Down Expand Up @@ -252,7 +252,7 @@ CATEGORIES :
- g_dyn_view_set_mixed:
TODO : soon
NAME : setMixed

TITLE : set*
SUMMARY : *g_dyn_table_set_xxx_summary
DESCR : *g_dyn_table_set_xxx_descr
Expand Down Expand Up @@ -362,7 +362,7 @@ CATEGORIES :
EXAMPLES:
- CODE : ex_objc_dyn_view_find_first_xxx
DESCR :

- g_dyn_view_find_all_bool_const:
IGNORE : ""
- g_dyn_view_find_all_int_const:
Expand Down Expand Up @@ -490,7 +490,7 @@ CATEGORIES :
TODO : later
- g_dyn_view_minimum_double:
TODO : later

NAMES : [minimum, minimum_float, minimum_double]
SUMMARY : *g_dyn_view_minimum_summary
DESCR : *g_dyn_view_minimum_descr
Expand Down
8 changes: 4 additions & 4 deletions doc/ref/data/mixed_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CATEGORIES:
(TightdbMixed *)mixedWithTable:(TightdbTable *)value
PARAMS:
- NAME : v
TYPES : [BOOL, int64_t, float, double, Date, NSString,
TYPES : [BOOL, int64_t, float, double, Date, NSString,
TightdbBinary, const char*, TightdbTable]
DESCR : *g_mixed_constructor_parm1_descr
EXAMPLES:
Expand Down Expand Up @@ -82,7 +82,7 @@ CATEGORIES:
- g_mixed_get_float:
NAME : getFloat
- g_mixed_get_double:
NAME : getDouble
NAME : getDouble
- g_mixed_get_date:
NAME : getDate
- g_mixed_get_string:
Expand All @@ -97,13 +97,13 @@ CATEGORIES:
(int64_t)getInt
(time_t)getDate
(float)getFloat
(double)getDouble
(double)getDouble
(NSString *)getString
(TightdbBinary *)getBinary
(TightdbTable *)getTable
CONST : True
RETURN:
TYPES : [BOOL, int64_t, float, double, time_t, NSString,
TYPES : [BOOL, int64_t, float, double, time_t, NSString,
TightdbBinary, TightdbTable]
DESCR : *g_mixed_get_return1_descr
EXAMPLES:
Expand Down
12 changes: 6 additions & 6 deletions doc/ref/data/reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ STATUS:
as the core library, and it should be used with caution.
DESCR : >
The goal of TightDB is to provide a high performance
data storage for your applications.
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
Expand All @@ -24,8 +24,8 @@ DESCR : >
The core of the framework is the class {@link class_dyn_table}. The
class is a representation of the
fundamental concept <strong>Table</strong>. You can use
{@link class_typed_table} in the situations where you know the table structure
fundamental concept <strong>Table</strong>. You can use
{@link class_typed_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.
Expand All @@ -34,7 +34,7 @@ DESCR : >
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_dyn_query} and
It is possible to query data using the {@link class_dyn_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
Expand Down Expand Up @@ -66,8 +66,8 @@ CATEGORIES: # list global class-id in order of appearence
- mixed
# - cursor

EXAMPLES :
- DESCR :
EXAMPLES :
- DESCR :
CODE : #ex_objc_intro # id to example code

## Checked:
Expand Down
Loading

0 comments on commit a22166b

Please sign in to comment.