Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Kirill Smelkov
ZODB
Commits
1ceb36d8
Commit
1ceb36d8
authored
Mar 19, 2005
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Completed (low level) multi-database support. See testmultidb.py
parent
070a730d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
branches/pycon-multidb/src/ZODB/Connection.py
branches/pycon-multidb/src/ZODB/Connection.py
+10
-2
No files found.
branches/pycon-multidb/src/ZODB/Connection.py
View file @
1ceb36d8
...
...
@@ -257,8 +257,13 @@ class Connection(ExportImport, object):
def
get_connection
(
self
,
database_name
):
"""Return a Connection for the named database."""
# XXX implement this
return
connection
=
self
.
connections
.
get
(
database_name
)
if
connection
is
None
:
new_con
=
self
.
_db
.
databases
[
database_name
].
open
()
self
.
connections
.
update
(
new_con
.
connections
)
new_con
.
connections
=
self
.
connections
connection
=
new_con
return
connection
def
getTransaction
(
self
):
"""Get the current transaction for this connection.
...
...
@@ -453,6 +458,9 @@ class Connection(ExportImport, object):
self
.
_reader
=
ConnectionObjectReader
(
self
,
self
.
_cache
,
self
.
_db
.
classFactory
)
# Multi-database support
self
.
connections
=
{
self
.
_db
.
database_name
:
self
}
def
_resetCache
(
self
):
"""Creates a new cache, discarding the old one.
...
...
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