constants.py 533 B

123456789101112131415161718192021222324
  1. """
  2. Constants specific to the SQL storage portion of the ORM.
  3. """
  4. # Size of each "chunk" for get_iterator calls.
  5. # Larger values are slightly faster at the expense of more storage space.
  6. GET_ITERATOR_CHUNK_SIZE = 100
  7. # Namedtuples for sql.* internal use.
  8. # How many results to expect from a cursor.execute call
  9. MULTI = "multi"
  10. SINGLE = "single"
  11. CURSOR = "cursor"
  12. NO_RESULTS = "no results"
  13. ORDER_DIR = {
  14. "ASC": ("ASC", "DESC"),
  15. "DESC": ("DESC", "ASC"),
  16. }
  17. # SQL join types.
  18. INNER = "INNER JOIN"
  19. LOUTER = "LEFT OUTER JOIN"