Skip to content

Commit

Permalink
Merge pull request #73 from bmunkholm/master
Browse files Browse the repository at this point in the history
minor fix in CPP tutorial.
  • Loading branch information
bmunkholm committed Apr 2, 2013
2 parents 376f35a + e002cc4 commit 5204e0b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/tutorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int main() {
MyTable::Ref table = tr.get_table<MyTable>("employees");

// Add row to table
t->add("Bill", 53, true);
table->add("Bill", 53, true);

tr.commit(); // end transaction
}
Expand Down
1 change: 1 addition & 0 deletions test/expect_json-win.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"int":0,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string0","string_long":"string0 very long string.........","string_enum":"enum1","binary":"62696e61727900","mixed":false,"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-123,"sub_second":"sub"}]},{"int":-1,"bool":true,"date":"1970-01-01 03:25:45","float":-1.2345600e+002,"double":-9.8765432099999998e+003,"string":"string1","string_long":"string1 very long string.........","string_enum":"enum2","binary":"62696e61727900","mixed":-1,"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-1357,"sub_second":"sub"}]},{"int":2,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string2","string_long":"string2 very long string.........","string_enum":"enum3","binary":"62696e61727900","mixed":"string","tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":2345,"sub_second":"sub"}]},{"int":-3,"bool":true,"date":"1970-01-01 03:25:45","float":-1.2345600e+002,"double":-9.8765432099999998e+003,"string":"string3","string_long":"string3 very long string.........","string_enum":"enum1","binary":"62696e61727900","mixed":"1973-11-29 21:33:09","tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-3825,"sub_second":"sub"}]},{"int":4,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string4","string_long":"string4 very long string.........","string_enum":"enum2","binary":"62696e61727900","mixed":"62696e61727900","tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":4813,"sub_second":"sub"}]},{"int":-5,"bool":true,"date":"1970-01-01 03:25:45","float":-1.2345600e+002,"double":-9.8765432099999998e+003,"string":"string5","string_long":"string5 very long string.........","string_enum":"enum3","binary":"62696e61727900","mixed":[{"first":0,"second":"mixed sub"},{"first":-25,"second":"mixed sub"}],"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-6293,"sub_second":"sub"}]},{"int":6,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string6","string_long":"string6 very long string.........","string_enum":"enum1","binary":"62696e61727900","mixed":7.3859998e+002,"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":7281,"sub_second":"sub"}]},{"int":-7,"bool":true,"date":"1970-01-01 03:25:45","float":-1.2345600e+002,"double":-9.8765432099999998e+003,"string":"string7","string_long":"string7 very long string.........","string_enum":"enum2","binary":"62696e61727900","mixed":-6.9135500000000002e+003,"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-8761,"sub_second":"sub"}]},{"int":8,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string8","string_long":"string8 very long string.........","string_enum":"enum3","binary":"62696e61727900","mixed":false,"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":9749,"sub_second":"sub"}]},{"int":-9,"bool":true,"date":"1970-01-01 03:25:45","float":-1.2345600e+002,"double":-9.8765432099999998e+003,"string":"string9","string_long":"string9 very long string.........","string_enum":"enum1","binary":"62696e61727900","mixed":-81,"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-11229,"sub_second":"sub"}]},{"int":10,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string10","string_long":"string10 very long string.........","string_enum":"enum2","binary":"62696e61727900","mixed":"string","tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":12217,"sub_second":"sub"}]},{"int":-11,"bool":true,"date":"1970-01-01 03:25:45","float":-1.2345600e+002,"double":-9.8765432099999998e+003,"string":"string11","string_long":"string11 very long string.........","string_enum":"enum3","binary":"62696e61727900","mixed":"1973-11-29 21:33:09","tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-13697,"sub_second":"sub"}]},{"int":12,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string12","string_long":"string12 very long string.........","string_enum":"enum1","binary":"62696e61727900","mixed":"62696e61727900","tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":14685,"sub_second":"sub"}]},{"int":-13,"bool":true,"date":"1970-01-01 03:25:45","float":-1.2345600e+002,"double":-9.8765432099999998e+003,"string":"string13","string_long":"string13 very long string.........","string_enum":"enum2","binary":"62696e61727900","mixed":[{"first":0,"second":"mixed sub"},{"first":-169,"second":"mixed sub"}],"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":-16165,"sub_second":"sub"}]},{"int":14,"bool":false,"date":"1970-01-01 03:25:45","float":1.2345600e+002,"double":9.8765432099999998e+003,"string":"string14","string_long":"string14 very long string.........","string_enum":"enum3","binary":"62696e61727900","mixed":1.7234000e+003,"tables":[{"sub_first":-123,"sub_second":"sub"},{"sub_first":17153,"sub_second":"sub"}]}]
16 changes: 16 additions & 0 deletions test/expect_string-win.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
int bool date float double string string_long string_enum binary mixed tables
0: 0 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string0 string0 very long st... enum1 7 bytes false [2]
1: -1 true 1970-01-01 03:25:45 -1.234560e+002 -9.876543e+003 string1 string1 very long st... enum2 7 bytes -1 [2]
2: 2 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string2 string2 very long st... enum3 7 bytes string [2]
3: -3 true 1970-01-01 03:25:45 -1.234560e+002 -9.876543e+003 string3 string3 very long st... enum1 7 bytes 1973-11-29 21:33:09 [2]
4: 4 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string4 string4 very long st... enum2 7 bytes 7 bytes [2]
5: -5 true 1970-01-01 03:25:45 -1.234560e+002 -9.876543e+003 string5 string5 very long st... enum3 7 bytes [2] [2]
6: 6 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string6 string6 very long st... enum1 7 bytes 7.386000e+002 [2]
7: -7 true 1970-01-01 03:25:45 -1.234560e+002 -9.876543e+003 string7 string7 very long st... enum2 7 bytes -6.913550e+003 [2]
8: 8 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string8 string8 very long st... enum3 7 bytes false [2]
9: -9 true 1970-01-01 03:25:45 -1.234560e+002 -9.876543e+003 string9 string9 very long st... enum1 7 bytes -81 [2]
10: 10 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string10 string10 very long s... enum2 7 bytes string [2]
11: -11 true 1970-01-01 03:25:45 -1.234560e+002 -9.876543e+003 string11 string11 very long s... enum3 7 bytes 1973-11-29 21:33:09 [2]
12: 12 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string12 string12 very long s... enum1 7 bytes 7 bytes [2]
13: -13 true 1970-01-01 03:25:45 -1.234560e+002 -9.876543e+003 string13 string13 very long s... enum2 7 bytes [2] [2]
14: 14 false 1970-01-01 03:25:45 1.234560e+002 9.876543e+003 string14 string14 very long s... enum3 7 bytes 1.723400e+003 [2]
2 changes: 1 addition & 1 deletion tightdb-msvs-lib.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>USE_SSE; DPTW32_BUILD; PTW32_STATIC_LIB; WIN32; _UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>DPTW32_BUILD; PTW32_STATIC_LIB; WIN32; _UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;src\win32;src\win32\pthread;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
Expand Down

0 comments on commit 5204e0b

Please sign in to comment.