class_docstr: SQLite3 TaskRecord backend.
docstr: Find records matching a query dict, optionally extracting subset of keys.
  
  Returns list of matching records.
  
  Parameters
  ----------
  check : dict
      mongodb-style query argument
  keys : list of strs [optional]
      if specified, the subset of keys to extract.  msg_id will *always* be
      included.
docstr_tok: ["Find","records","matching","a","query","dict",",","optionally","extracting","subset","of","keys",".","Returns","list","of","matching","records",".","Parameters","--","--","--","--","--","check",":","dict","mongodb-style","query","argument","keys",":","list","of","strs","[","optional","]","if","specified",",","the","subset","of","keys","to","extract",".","msg_id","will","*","always","*","be","included","."]
code: def find_records(self, check, keys=None):
      """Find records matching a query dict, optionally extracting subset of keys.
  
      Returns list of matching records.
  
      Parameters
      ----------
      check : dict
          mongodb-style query argument
      keys : list of strs [optional]
          if specified, the subset of keys to extract.  msg_id will *always* be
          included.
      """
      if keys:
          bad_keys = [key for key in keys if key not in self._keys]
          if bad_keys:
              raise KeyError("Bad record key(s): %s" % bad_keys)
  
      if keys:
          # ensure msg_id is present and first:
          if "msg_id" in keys:
              keys.remove("msg_id")
          keys.insert(0, "msg_id")
          req = ", ".join(keys)
      else:
          req = "*"
      expr, args = self._render_expression(check)
      query = f"""SELECT {req} FROM '{self.table}' WHERE {expr}"""
      cursor = self._db.execute(query, args)
      matches = cursor.fetchall()
      records = []
      for line in matches:
          rec = self._list_to_dict(line, keys)
          records.append(rec)
      return records
  
imports: import json
  import os
  from datetime import datetime
  from dateutil.parser import parse
  from tornado import ioloop
  from traitlets import Dict, Instance, List, Unicode
  from ..util import ensure_timezone, extract_dates
  from .dictdb import BaseDB
label_desc: Use image node_id 14 for calling the SQLiteDB obj's underlying member method code with example usage: obj.find_records(check, keys) and returns: records