| 1 |
""" |
| 2 |
Constants specific to the SQL storage portion of the ORM. |
| 3 |
""" |
| 4 |
|
| 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 |
|
| 9 |
# Namedtuples for sql.* internal use. |
| 10 |
|
| 11 |
# How many results to expect from a cursor.execute call |
| 12 |
MULTI = "multi" |
| 13 |
SINGLE = "single" |
| 14 |
NO_RESULTS = "no results" |
| 15 |
# Rather than returning results, returns: |
| 16 |
CURSOR = "cursor" |
| 17 |
ROW_COUNT = "row count" |
| 18 |
|
| 19 |
ORDER_DIR = { |
| 20 |
"ASC": ("ASC", "DESC"), |
| 21 |
"DESC": ("DESC", "ASC"), |
| 22 |
} |
| 23 |
|
| 24 |
# SQL join types. |
| 25 |
INNER = "INNER JOIN" |
| 26 |
LOUTER = "LEFT OUTER JOIN" |