Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vincent Pelletier
neoppod
Commits
b7577914
Commit
b7577914
authored
Jul 11, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqlite: make 'config' table easier to read
parent
23fad3af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
neo/storage/database/sqlite.py
neo/storage/database/sqlite.py
+4
-4
No files found.
neo/storage/database/sqlite.py
View file @
b7577914
...
...
@@ -100,7 +100,7 @@ class SQLiteDatabaseManager(DatabaseManager):
# persistent data.
q
(
"""CREATE TABLE IF NOT EXISTS config (
name TEXT NOT NULL PRIMARY KEY,
value
BLOB
)
value
TEXT
)
"""
)
# The table "pt" stores a partition table.
...
...
@@ -178,8 +178,8 @@ class SQLiteDatabaseManager(DatabaseManager):
return
self
.
_config
[
key
]
except
KeyError
:
try
:
r
=
s
tr
(
s
elf
.
query
(
"SELECT value FROM config WHERE name=?"
,
(
key
,)).
fetchone
()[
0
])
r
=
self
.
query
(
"SELECT value FROM config WHERE name=?"
,
(
key
,)).
fetchone
()[
0
]
except
TypeError
:
r
=
None
self
.
_config
[
key
]
=
r
...
...
@@ -191,7 +191,7 @@ class SQLiteDatabaseManager(DatabaseManager):
if
value
is
None
:
q
(
"DELETE FROM config WHERE name=?"
,
(
key
,))
else
:
q
(
"REPLACE INTO config VALUES (?,?)"
,
(
key
,
buffer
(
str
(
value
)
)))
q
(
"REPLACE INTO config VALUES (?,?)"
,
(
key
,
str
(
value
)))
def
_setPackTID
(
self
,
tid
):
self
.
_setConfiguration
(
'_pack_tid'
,
tid
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment