server/sources/native.py
branchstable
changeset 2072 8008e8812d76
parent 2066 2c4bf4ee88a2
child 2306 95da5d9f0870
equal deleted inserted replaced
2071:6ebada01a4a1 2072:8008e8812d76
   152         self.dbhelper.fti_need_distinct_query = self.indexer.need_distinct
   152         self.dbhelper.fti_need_distinct_query = self.indexer.need_distinct
   153         # sql queries cache
   153         # sql queries cache
   154         self._cache = Cache(repo.config['rql-cache-size'])
   154         self._cache = Cache(repo.config['rql-cache-size'])
   155         self._temp_table_data = {}
   155         self._temp_table_data = {}
   156         self._eid_creation_lock = Lock()
   156         self._eid_creation_lock = Lock()
   157         if self.dbdriver == 'sqlite':
   157         # XXX no_sqlite_wrap trick since we've a sqlite locking pb when
       
   158         # running unittest_multisources with the wrapping below
       
   159         if self.dbdriver == 'sqlite' and \
       
   160                not getattr(repo.config, 'no_sqlite_wrap', False):
   158             from cubicweb.server.sources.extlite import ConnectionWrapper
   161             from cubicweb.server.sources.extlite import ConnectionWrapper
   159             self.get_connection = lambda: ConnectionWrapper(self)
   162             self.get_connection = lambda: ConnectionWrapper(self)
   160             self.check_connection = lambda cnx: cnx
   163             self.check_connection = lambda cnx: cnx
   161             def pool_reset(cnx):
   164             def pool_reset(cnx):
   162                 if cnx._cnx is not None:
   165                 if cnx._cnx is not None: