Skip to content

Commit 50d64c6

Browse files
committed
Fix doc
1 parent f1c3954 commit 50d64c6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ Note: The cache size is used as 40kb in these examples, but in real life 32mb or
6666
In this mode, a table is created with just 2 columns, `key` and `value` as shown below:
6767

6868
```python
69-
import sqlite_blaster_python
69+
import sqlite_blaster_python as m
7070

7171
col_names = "key, value"
72-
sqib = sqlite_blaster_python.sqlite_index_blaster(2, 1, col_names, "imain", 4096, 40000, "kv_idx.db")
72+
sqib = m.sqlite_index_blaster(2, 1, col_names, "imain", 4096, 40000, "kv_idx.db")
7373
sqib.put_string("hello", "world")
7474
sqib.close()
7575
```
@@ -93,10 +93,10 @@ COMMIT;
9393
To retrieve the inserted values, use `get` method as shown below
9494

9595
```python
96-
import sqlite_blaster_python
96+
import sqlite_blaster_python as m
9797

9898
col_names = "key, value"
99-
sqib = sqlite_blaster_python.sqlite_index_blaster(2, 1, col_names, "imain", 4096, 40, "kv_idx.db")
99+
sqib = m.sqlite_index_blaster(2, 1, col_names, "imain", 4096, 40, "kv_idx.db")
100100
sqib.put_string("hello", "world")
101101
print("Value of hello is", sqib.get_string("hello", "not_found"))
102102
sqib.close()
@@ -109,13 +109,13 @@ The second parameter to `get_string` is for specifying what value is to be retur
109109
In this mode, a table is created with just 2 columns, `key` and `doc` as shown below:
110110

111111
```python
112-
import sqlite_blaster_python
112+
import sqlite_blaster_python as m
113113

114114
json1 = '{"name": "Alice", "age": 25, "email": "[email protected]"}'
115115
json2 = '{"name": "George", "age": 32, "email": "[email protected]"}'
116116

117117
col_names = "key, doc"
118-
sqib = sqlite_blaster_python.sqlite_index_blaster(2, 1, col_names, "doc_index", 4096, 40, "doc_store.db")
118+
sqib = m.sqlite_index_blaster(2, 1, col_names, "doc_index", 4096, 40, "doc_store.db")
119119
sqib.put_string("primary_contact", json1)
120120
sqib.put_string("secondary_contact", json2)
121121
sqib.close()
@@ -134,10 +134,10 @@ WHERE key = 'primary_contact';
134134
This repo can be used to create regular tables with primary key(s) as shown below:
135135

136136
```python
137-
import sqlite_blaster_python
137+
import sqlite_blaster_python as m
138138

139139
col_names = "student_name, age, maths_marks, physics_marks, chemistry_marks, average_marks"
140-
sqib = sqlite_blaster_python.sqlite_index_blaster(6, 2, col_names, "student_marks", 4096, 40, "student_marks.db")
140+
sqib = m.sqlite_index_blaster(6, 2, col_names, "student_marks", 4096, 40, "student_marks.db")
141141

142142
sqib.put_rec(["Robert", 19, 80, 69, 98, round((80+69+98)/3, 2)])
143143
sqib.put_rec(["Barry", 20, 82, 99, 83, round((82+99+83)/3, 2)])

0 commit comments

Comments
 (0)