constants.py 599 B

1234567891011121314151617181920212223242526
  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. NO_RESULTS = "no results"
  12. # Rather than returning results, returns:
  13. CURSOR = "cursor"
  14. ROW_COUNT = "row count"
  15. ORDER_DIR = {
  16. "ASC": ("ASC", "DESC"),
  17. "DESC": ("DESC", "ASC"),
  18. }
  19. # SQL join types.
  20. INNER = "INNER JOIN"
  21. LOUTER = "LEFT OUTER JOIN"