INNER CODE UNIT · Python

dot_trace

probcomp/bayeslite · shell/src/core.py:396

    def dot_trace(self, line):
        '''trace queries
        [bql|sql]

        Trace BQL or SQL queries executed in the database.
        Use `.untrace' to undo.
        '''
        if line == 'bql':
            if not self._traced:
                self._bdb.trace(self._trace)
                self._traced = True
        elif line == 'sql':
            if not self._sql_traced:
                self._bdb.sql_trace(self._sql_trace)
                self._sql_traced = True
        else:
            self.stdout.write('Usage: .trace bql\n')
            self.stdout.write('       .trace sql\n')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…