Skip to content

Commit

Permalink
Merge pull request #92 from bmunkholm/refdoc
Browse files Browse the repository at this point in the history
Refdoc updates (mainly)
  • Loading branch information
bmunkholm committed May 13, 2013
2 parents ce60f6c + 9e56f73 commit 8c3604b
Show file tree
Hide file tree
Showing 18 changed files with 390 additions and 293 deletions.
File renamed without changes.
52 changes: 0 additions & 52 deletions doc/development/development guidelines.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,4 @@


Coding Style standard
=====================


//
// TightDB C++ coding standard - by example
//


// Max length of a line is 120 characters -----------------------------------------------------------------------------

#define TIGHTDB_MY_DEF 1 // All defines are uppercase and prefixed TIGHTDB

class tightdb { // "{" on same line
void my_func(int a, int b); // function and variable identifiers with lowercase and "_" if needed

int m_var1; // class member variables prefixed with "m_".
static int s_var1; // static variables are prefixed with "s_"
}

void tightdb::my_func(int a,
int b)
// IF multiple parameters are made on multiple lines, align identation
// Function "{" on seperate line. Yes - it's inconsistent...but we like it
{
// Indentation is 4 spaces - not TAB
char* ptr; // Pointer "*" belongs to the type
const char* const ptr; // Const placement

// Single statement if, ok without {}
if (1) // space between keywords and first "("
do(); // Single statement on seperate line

// "{" on same line, "}" on seperate
if (1) {
}
else { // else on seperate line
}

// space between expressions and operators
if (a && b)
do();

const size_t count = t.size(); // seperate var for function call "size"
for (size_t i; i < count; ++i) { // ++i - NOT i++
}

}



Source code branch strategy
===========================

Expand Down
80 changes: 43 additions & 37 deletions doc/ref_cpp/data/dyn_query_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,20 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : &g_dyn_query_column_index_descr
Column index.
- NAME : value
TYPES : [bool, int64_t, float, double, StringData, BinaryData, Date]
DESCR : The value.
DESCR : &g_dyn_query_value_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: <code>true</code>.'
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : &g_dyn_query_return_query_object_descr
The query object.
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_equals
Expand Down Expand Up @@ -103,16 +106,16 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [bool, int64_t, float, double, StringData, Date]
DESCR : The value.
DESCR : *g_dyn_query_value_descr
- NAME : case_sensitive
TYPES : bool
DESCR : 'String match can be performed case sensitive or not. Default: <code>true</code>.'
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_notEquals
Expand All @@ -134,13 +137,13 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [int64_t, float, double, Date]
DESCR : The value.
DESCR : *g_dyn_query_value_descr
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_greaterThan
Expand All @@ -162,13 +165,13 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [int64_t, float, double, Date]
DESCR : The value.
DESCR : *g_dyn_query_value_descr
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_greaterThanOrEqual
Expand All @@ -190,13 +193,13 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [int64_t, float, double, Date]
DESCR : The value.
DESCR : *g_dyn_query_value_descr
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_lessThan
Expand All @@ -218,13 +221,13 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [int64_t, float, double, Date]
DESCR : The value.
DESCR : *g_dyn_query_value_descr
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_lessThanOrEqual
Expand All @@ -246,7 +249,7 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : from
TYPES : [int64_t, float, double, Date]
DESCR : Lowest value of range (inclusive).
Expand All @@ -255,7 +258,7 @@ CATEGORIES :
DESCR : Highest value of range (inclusive).
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_between
Expand All @@ -272,16 +275,16 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [StringData, BinaryData]
DESCR : The value.
DESCR : *g_dyn_query_value_descr
- NAME : case_sensitive
TYPES : bool
DESCR : *g_dyn_query_case_sensitive_descr
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_startsWith
Expand All @@ -298,16 +301,16 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [StringData, BinaryData]
DESCR : The value.
DESCR : *g_dyn_query_value_descr
- NAME : case_sensitive
TYPES : bool
DESCR : *g_dyn_query_case_sensitive_descr
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_endsWith
Expand All @@ -324,7 +327,7 @@ CATEGORIES :
PARAMS:
- NAME : column_ndx
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
- NAME : value
TYPES : [StringData, BinaryData]
DESCR : The value
Expand All @@ -333,7 +336,7 @@ CATEGORIES :
DESCR : *g_dyn_query_case_sensitive_descr
RETURN:
TYPES : Query&
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_contains
Expand All @@ -353,7 +356,7 @@ CATEGORIES :
Start group ("left parenthesis").
RETURN:
TYPES : Query
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_group
Expand All @@ -366,7 +369,7 @@ CATEGORIES :
Stop group ("right parenthesis").
RETURN:
TYPES : Query
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_group
Expand All @@ -378,7 +381,7 @@ CATEGORIES :
Logical-or.
RETURN:
TYPES : Query
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_or
Expand All @@ -394,7 +397,7 @@ CATEGORIES :
PARAMS:
- NAME : column
TYPES : size_t
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
RETURN:
TYPES : Query
DESCR : The query object.
Expand All @@ -409,7 +412,7 @@ CATEGORIES :
End of subtable query.
RETURN:
TYPES : Query
DESCR : The query object.
DESCR : *g_dyn_query_return_query_object_descr
EXAMPLES:
- DESCR :
CODE : ex_cpp_dyn_query_subtable
Expand Down Expand Up @@ -472,7 +475,7 @@ CATEGORIES :
CONST : true
PARAMS:
- NAME : column
DESCR : Column index.
DESCR : *g_dyn_query_column_index_descr
TYPES : size_t
- NAME : start
TYPES : size_t
Expand Down Expand Up @@ -576,7 +579,8 @@ CATEGORIES :
Date maximum_date(..parameters as above..)
PARAMS:
- NAME : column_ndx
DESCR : Column index. The datatype of the column must match the function called. E.g. <code>maximum_float()</code> can only be used on columns which contains floats.
DESCR : &g_dyn_query_maximum_parm1
Column index. The datatype of the column must match the function called. E.g. <code>maximum_float()</code> 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.
Expand Down Expand Up @@ -615,7 +619,8 @@ CATEGORIES :
Date minimum_date(..parameters as above..)
PARAMS:
- NAME : column_ndx
DESCR : Column index. The datatype of the column must match the function called. E.g. <code>minimum_float()</code> can only be used on columns which contains floats.
DESCR : &g_dyn_query_minimum_parm1
Column index. The datatype of the column must match the function called. E.g. <code>minimum_float()</code> 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.
Expand Down Expand Up @@ -656,7 +661,8 @@ CATEGORIES :
double average_double(..as above..)
PARAMS:
- NAME : column_ndx
DESCR : Column index. The datatype of the column must match the function called. E.g. <code>average_float()</code> can only be used on columns which contains floats.
DESCR : &g_dyn_query_average_parm1
Column index. The datatype of the column must match the function called. E.g. <code>average_float()</code> 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.
Expand Down
Loading

0 comments on commit 8c3604b

Please sign in to comment.