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
nexedi
ZODB
Commits
f8014d9f
Commit
f8014d9f
authored
Jul 03, 2006
by
Florent Guillaume
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup unused var, more shuffling around.
parent
d50d85bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
src/ZODB/Connection.py
src/ZODB/Connection.py
+12
-13
No files found.
src/ZODB/Connection.py
View file @
f8014d9f
...
@@ -74,27 +74,30 @@ class Connection(ExportImport, object):
...
@@ -74,27 +74,30 @@ class Connection(ExportImport, object):
def
__init__
(
self
,
db
,
version
=
''
,
cache_size
=
400
):
def
__init__
(
self
,
db
,
version
=
''
,
cache_size
=
400
):
"""Create a new Connection."""
"""Create a new Connection."""
self
.
_log
=
logging
.
getLogger
(
'ZODB.Connection'
)
self
.
_debug_info
=
()
self
.
_db
=
db
self
.
_db
=
db
# Multi-database support
self
.
connections
=
{
self
.
_db
.
database_name
:
self
}
self
.
_synch
=
None
self
.
_mvcc
=
None
self
.
_version
=
version
self
.
_version
=
version
self
.
_normal_storage
=
self
.
_storage
=
db
.
_storage
self
.
_normal_storage
=
self
.
_storage
=
db
.
_storage
self
.
new_oid
=
db
.
_storage
.
new_oid
self
.
new_oid
=
db
.
_storage
.
new_oid
self
.
_savepoint_storage
=
None
self
.
_savepoint_storage
=
None
# Do we need to join a txn manager?
self
.
_needs_to_join
=
True
self
.
transaction_manager
=
None
self
.
transaction_manager
=
None
self
.
_synch
=
None
self
.
_mvcc
=
None
self
.
_log
=
logging
.
getLogger
(
"ZODB.Connection"
)
self
.
_debug_info
=
()
self
.
_opened
=
None
# time.time() when DB.open() opened us
self
.
_opened
=
None
# time.time() when DB.open() opened us
self
.
_reset_counter
=
global_reset_counter
self
.
_reset_counter
=
global_reset_counter
self
.
_load_count
=
0
# Number of objects unghosted
self
.
_load_count
=
0
# Number of objects unghosted
self
.
_store_count
=
0
# Number of objects stored
self
.
_store_count
=
0
# Number of objects stored
# Do we need to join a txn manager?
self
.
_needs_to_join
=
True
# Cache which can ghostify (forget the state of) objects not
# Cache which can ghostify (forget the state of) objects not
# recently used. Its API is roughly that of a dict, with
# recently used. Its API is roughly that of a dict, with
# additional gc-related and invalidation-related methods.
# additional gc-related and invalidation-related methods.
...
@@ -154,7 +157,7 @@ class Connection(ExportImport, object):
...
@@ -154,7 +157,7 @@ class Connection(ExportImport, object):
# critical sections (if any -- this needs careful thought).
# critical sections (if any -- this needs careful thought).
self
.
_inv_lock
=
threading
.
Lock
()
self
.
_inv_lock
=
threading
.
Lock
()
self
.
_invalidated
=
d
=
{}
self
.
_invalidated
=
{}
# We intend to prevent committing a transaction in which
# We intend to prevent committing a transaction in which
# ReadConflictError occurs. _conflicts is the set of oids that
# ReadConflictError occurs. _conflicts is the set of oids that
...
@@ -179,12 +182,8 @@ class Connection(ExportImport, object):
...
@@ -179,12 +182,8 @@ class Connection(ExportImport, object):
# to pass to _importDuringCommit().
# to pass to _importDuringCommit().
self
.
_import
=
None
self
.
_import
=
None
self
.
_reader
=
ObjectReader
(
self
,
self
.
_cache
,
self
.
_db
.
classFactory
)
self
.
_reader
=
ObjectReader
(
self
,
self
.
_cache
,
self
.
_db
.
classFactory
)
# Multi-database support
self
.
connections
=
{
self
.
_db
.
database_name
:
self
}
def
add
(
self
,
obj
):
def
add
(
self
,
obj
):
"""Add a new object 'obj' to the database and assign it an oid."""
"""Add a new object 'obj' to the database and assign it an oid."""
...
...
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