(self)
| 177 | # Gets a cursor object to database |
| 178 | # Return: Cursor class |
| 179 | def getCursor(self): |
| 180 | if not self.conn: |
| 181 | self.connect() |
| 182 | |
| 183 | cur = DbCursor(self.conn, self) |
| 184 | cur.execute('PRAGMA journal_mode=WAL') |
| 185 | if self.foreign_keys: |
| 186 | cur.execute("PRAGMA foreign_keys = ON") |
| 187 | |
| 188 | return cur |
| 189 | |
| 190 | def getSharedCursor(self): |
| 191 | if not self.conn: |