mirror of https://github.com/sgoudham/Enso-Bot.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
591 B
Python
28 lines
591 B
Python
"""
|
|
Constants specific to the SQL storage portion of the ORM.
|
|
"""
|
|
|
|
import re
|
|
|
|
# Size of each "chunk" for get_iterator calls.
|
|
# Larger values are slightly faster at the expense of more storage space.
|
|
GET_ITERATOR_CHUNK_SIZE = 100
|
|
|
|
# Namedtuples for sql.* internal use.
|
|
|
|
# How many results to expect from a cursor.execute call
|
|
MULTI = 'multi'
|
|
SINGLE = 'single'
|
|
CURSOR = 'cursor'
|
|
NO_RESULTS = 'no results'
|
|
|
|
ORDER_PATTERN = re.compile(r'\?|[-+]?[.\w]+$')
|
|
ORDER_DIR = {
|
|
'ASC': ('ASC', 'DESC'),
|
|
'DESC': ('DESC', 'ASC'),
|
|
}
|
|
|
|
# SQL join types.
|
|
INNER = 'INNER JOIN'
|
|
LOUTER = 'LEFT OUTER JOIN'
|