From 992e06412cf124d511d56d2741988f503f4c8085 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 29 Jun 2014 00:10:59 -0400 Subject: - attach the ResultMetaData to the Compiled object, when we detect that the compiled cache is used. That allows us to cache the whole metadata and save on creating it at result time, when compiled cache is used. --- lib/sqlalchemy/sql/compiler.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/sql/compiler.py') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 11608ef3b..010df5a16 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -170,6 +170,8 @@ class Compiled(object): defaults. """ + _cached_metadata = None + def __init__(self, dialect, statement, bind=None, compile_kwargs=util.immutabledict()): """Construct a new ``Compiled`` object. -- cgit v1.2.1