-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- (bugfix) Recursive use of cursors not allowed error Redone FTS. - export and import todos - getConfig - ignoreitem crud - New repo MISC - apply character limit to todo title - diff formatting - don't redirect to log after committing todo - dropdown styling - make todo descrip visible by default if active - tooltips
- Loading branch information
1 parent
f528c25
commit 31573c2
Showing
12 changed files
with
530 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ CodeGarden.egg-info/ | |
htmlcov/ | ||
*.db | ||
garden-repos/ | ||
todos.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import sqlite3 | ||
|
||
from code_garden import config | ||
|
||
|
||
class Connector: | ||
def __init__(self): | ||
self.db = sqlite3.connect(config.HOME_DIR / "todos.db", check_same_thread=False) | ||
|
||
def write(self, stmt: str, params=()): | ||
with self.db as db: | ||
cursor = db.cursor() | ||
cursor.execute(stmt, params) | ||
|
||
def read(self, stmt: str, params=()): | ||
results = None | ||
with self.db as db: | ||
cursor = db.cursor() | ||
cursor.execute(stmt, params) | ||
|
||
results = cursor.fetchall() | ||
|
||
return results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.