self.__process_defaults()
self.postfetch_cols = self.compiled.postfetch
self.prefetch_cols = self.compiled.prefetch
-
- processors = dict(
- (key, value) for key, value in
- ( (compiled.bind_names[bindparam],
- bindparam.bind_processor(dialect))
- for bindparam in compiled.bind_names )
- if value is not None)
+
+ processors = compiled._get_bind_processors(dialect)
# Convert the dictionary of bind parameter values
# into a dict or list to be sent to the DBAPI's
# a map which tracks "truncated" names based on dialect.label_length
# or dialect.max_identifier_length
self.truncated_names = {}
+
+ # other memoized things
+ self._memos ={}
+ def _get_bind_processors(self, dialect):
+ key = 'bind_processors', dialect.__class__, \
+ dialect.server_version_info
+
+ if key not in self._memos:
+ self._memos[key] = processors = dict(
+ (key, value) for key, value in
+ ( (self.bind_names[bindparam],
+ bindparam.bind_processor(dialect))
+ for bindparam in self.bind_names )
+ if value is not None
+ )
+ return processors
+ else:
+ return self._memos[key]
+
def is_subquery(self):
return len(self.stack) > 1
if not self:
return frozendict(d)
else:
- d2 = self.copy()
- d2.update(d)
- return frozendict(d2)
+ d2 = frozendict(self)
+ dict.update(d2, d)
+ return d2
def __repr__(self):
return "frozendict(%s)" % dict.__repr__(self)
metadata.drop_all()
@profiling.function_call_count(14416, versions={'2.4': 13214,
- '2.6+cextension': 409, '2.7+cextension':438})
+ '2.6+cextension': 390, '2.7+cextension':401})
def test_string(self):
[tuple(row) for row in t.select().execute().fetchall()]
def test_profile_6_editing(self):
self.test_baseline_6_editing()
- @profiling.function_call_count(2641, {'2.4': 1673, '2.6+cextension'
+ @profiling.function_call_count(2431, {'2.4': 1673, '2.6+cextension'
: 2502})
def test_profile_7_multiview(self):
self.test_baseline_7_multiview()
def test_profile_1_create_tables(self):
self.test_baseline_1_create_tables()
- @profiling.function_call_count(6891)
+ @profiling.function_call_count(6347)
def test_profile_1a_populate(self):
self.test_baseline_1a_populate()
- @profiling.function_call_count(481)
+ @profiling.function_call_count(438)
def test_profile_2_insert(self):
self.test_baseline_2_insert()
def test_profile_5_aggregates(self):
self.test_baseline_5_aggregates()
- @profiling.function_call_count(2929)
+ @profiling.function_call_count(2774)
def test_profile_6_editing(self):
self.test_baseline_6_editing()