Classes | |
class | ExpectationFailed |
class | NamedQuery |
class | NamedQueryManager |
class | _RewriteQueryForArray |
Functions | |
def | _init_g_named_manager |
def | get |
def | sql |
def | run |
Variables | |
set = set | |
tuple | NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '') |
tuple | NQ_FILE_SUFFIX_LEN = len(NQ_FILE_SUFFIX) |
_g_named_manager = None |
\ @file named_query.py @author Ryan Williams, Phoenix @date 2007-07-31 @brief An API for running named queries. $LicenseInfo:firstyear=2007&license=mit$ Copyright (c) 2007-2008, Linden Research, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $/LicenseInfo$
def indra::util::named_query::_init_g_named_manager | ( | sql_dir = None |
) | [private] |
Initializes a global NamedManager object to point at a specified named queries hierarchy. This function is intended entirely for testing purposes, because it's tricky to control the config from inside a test.
Definition at line 55 of file named_query.py.
def indra::util::named_query::get | ( | name | ) |
Definition at line 72 of file named_query.py.
Referenced by LLError::addRecorder(), LLError::configure(), LLError::Log::flush(), LLError::Log::out(), LLError::removeRecorder(), LLError::Settings::reset(), LLError::Settings::restore(), LLError::Settings::saveAndReset(), LLError::setClassLevel(), LLError::setDefaultLevel(), LLError::setFatalFunction(), LLError::setFileLevel(), LLError::setFunctionLevel(), LLError::setPrintLocation(), LLError::setTagLevel(), LLError::setTimeFunction(), LLError::Log::shouldLog(), and LLError::shouldLogCallCount().
def indra::util::named_query::run | ( | connection, | ||
name, | ||||
params, | ||||
expect_rows = None | ||||
) |
\ @brief given a connection, run a named query with the params Note that this function will fetch ALL rows. @param connection The connection to use @param name The name of the query to run @param params The parameters passed into the query @param expect_rows The number of rows expected. Set to 1 if return_as_map is true. Raises ExpectationFailed if the number of returned rows doesn't exactly match. Kind of a hack. @return Returns the result set as a list of dicts.
Definition at line 82 of file named_query.py.
Referenced by LLTextBox::setWrappedText().
def indra::util::named_query::sql | ( | connection, | ||
name, | ||||
params | ||||
) |
Definition at line 78 of file named_query.py.
Definition at line 53 of file named_query.py.
tuple indra::util::named_query::NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '') |
Definition at line 50 of file named_query.py.
Definition at line 51 of file named_query.py.
Definition at line 43 of file named_query.py.