You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.py 591B

123456789101112131415161718192021222324252627
  1. """
  2. Constants specific to the SQL storage portion of the ORM.
  3. """
  4. import re
  5. # Size of each "chunk" for get_iterator calls.
  6. # Larger values are slightly faster at the expense of more storage space.
  7. GET_ITERATOR_CHUNK_SIZE = 100
  8. # Namedtuples for sql.* internal use.
  9. # How many results to expect from a cursor.execute call
  10. MULTI = 'multi'
  11. SINGLE = 'single'
  12. CURSOR = 'cursor'
  13. NO_RESULTS = 'no results'
  14. ORDER_PATTERN = re.compile(r'\?|[-+]?[.\w]+$')
  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'