@@ -53,11 +53,10 @@ In this mode, a table is created with just 2 columns, `key` and `value` as shown
5353``` c++
5454#include " sqlite_index_blaster.h"
5555#include < string>
56- #include < vector>
5756
5857int main () {
5958
60- std::vector<std:: string> col_names = { "key", " value"} ; // -std >= c++11
59+ std::string col_names = "key, value"; // -std >= c++11
6160 sqlite_index_blaster sqib(2, 1, col_names, "kv_index", 4096, 40, "kv_idx.db");
6261 sqib.put_string("hello", "world");
6362 return 0;
@@ -87,10 +86,9 @@ To retrieve the inserted values, use `get` method as shown below
8786``` c++
8887#include " sqlite_index_blaster.h"
8988#include < string>
90- #include < vector>
9189
9290int main () {
93- std::vector<std:: string> col_names = { "key", " value"} ; // -std >= c++11
91+ std::string col_names = "key, value"; // -std >= c++11
9492 sqlite_index_blaster sqib(2, 1, col_names, "kv_index", 4096, 40, "kv_idx.db");
9593 sqib.put_string("hello", "world");
9694 std::cout << "Value of hello is " << sqib.get_string("hello", "not_found") << std::endl;
@@ -105,13 +103,12 @@ In this mode, a table is created with just 2 columns, `key` and `doc` as shown b
105103``` c++
106104#include " sqlite_index_blaster.h"
107105#include < string>
108- #include < vector>
109106
110107const char * json1 = " {\" name\" : \" Alice\" , \" age\" : 25, \" email\" : \" alice@example.com\" }" ;
111108const char * json2 = " {\" name\" : \" George\" , \" age\" : 32, \" email\" : \" george@example.com\" }" ;
112109
113110int main () {
114- std::vector<std:: string> col_names = { "key", " doc"} ; // -std >= c++11
111+ std::string col_names = "key, doc"; // -std >= c++11
115112 sqlite_index_blaster sqib(2, 1, col_names, "doc_index", 4096, 40, "doc_store.db");
116113 sqib.put_string("primary_contact", json1);
117114 sqib.put_string("secondary_contact", json2);
@@ -134,15 +131,14 @@ This repo can be used to create regular tables with primary key(s) as shown belo
134131``` c++
135132#include < cmath>
136133#include < string>
137- #include < vector>
138134
139135#include " sqlite_index_blaster.h"
140136
141137const uint8_t col_types[] = {SQLT_TYPE_TEXT, SQLT_TYPE_INT8, SQLT_TYPE_INT8, SQLT_TYPE_INT8, SQLT_TYPE_INT8, SQLT_TYPE_REAL};
142138
143139int main() {
144140
145- std::vector<std:: string> col_names = { "student_name", " age", " maths_marks", " physics_marks", " chemistry_marks", " average_marks"} ;
141+ std::string col_names = "student_name, age, maths_marks, physics_marks, chemistry_marks, average_marks";
146142 sqlite_index_blaster sqib(6, 2, col_names, "student_marks", 4096, 40, "student_marks.db");
147143
148144 int8_t maths, physics, chemistry, age;
0 commit comments