Project

General

Profile

# Date Author Comment
11970 01/20/2014 11:33 AM Aaron Marcuse-Kubitza

moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).

7707 02/26/2013 04:37 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used _range(). Use SQL functions._range() instead.

7705 02/26/2013 04:30 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used _avg(). Use SQL functions._avg() instead.

7704 02/26/2013 04:29 PM Aaron Marcuse-Kubitza

schemas/functions.sql: Added _avg()

7655 02/26/2013 08:35 AM Aaron Marcuse-Kubitza

Moved parse_range() from xml_func.py to units.py

7141 01/09/2013 03:52 PM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Merging: Added _merge_prefix() passthru

7008 12/21/2012 11:31 AM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Logic: _and(), _or(): Evaluate an expression of only constant values

7006 12/21/2012 11:28 AM Aaron Marcuse-Kubitza

xml_func.py: is_scalar(): Fixed bug where need to check if value is a string before calling is_var_name()

7001 12/20/2012 04:41 PM Aaron Marcuse-Kubitza

xml_func.py: _first(): Fixed bug where need to choose the first non-empty param, by first pruning empty child nodes

6755 12/11/2012 04:31 AM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Added _eq()

6754 12/11/2012 04:31 AM Aaron Marcuse-Kubitza

xml_func.py: Added is_scalar()

6753 12/11/2012 04:30 AM Aaron Marcuse-Kubitza

xml_func.py: process(): row-based mode: preserving complex funcs: Fixed bug where functions with no params would crash reduce() because it requires at least one value when no initial value is specified

6431 11/24/2012 01:23 PM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Added passthru entries for _and, _or

6401 11/24/2012 07:23 AM Aaron Marcuse-Kubitza

xml_func.py: _env(): Fixed bug where need to retrieve actual string value of name param using xml_dom.NodeTextEntryIter instead of NodeEntryIter

6400 11/24/2012 07:20 AM Aaron Marcuse-Kubitza

xml_func.py: _env(): Fixed bug where need to use xml_dom.replace_with_text() instead of xml_dom.replace() because replace() requires a DOM node

6398 11/24/2012 06:43 AM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Added _env()

6357 11/21/2012 09:08 PM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Added _nullIf(), to remove calls with no null value

6223 11/15/2012 10:25 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used _map(), which has been replaced by a corresponding DB function

5720 10/23/2012 05:36 AM Aaron Marcuse-Kubitza

xml_func.py: process(): Pass on_error through to sql_io.put(). This fixes a bug in row-based import where DB errors in the xml_func.process() phase would abort the entire import instead of being tracked and having the return value set to None.

5409 10/10/2012 09:39 AM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Added _min, _max as passthroughs

5190 10/03/2012 03:58 AM Aaron Marcuse-Kubitza

xml_func.py: process(): Fixed bug where need to preserve complex functions that have unevaluated XML nodes as arguments, because XML nodes are not accepted by sql_io.put() (they are handled by db_xml.put())

5015 09/26/2012 08:31 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used _name(). Use _join_words() instead.

5011 09/26/2012 08:15 PM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Merging: Added _join_words()

4756 09/17/2012 03:31 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Run xml_dom.prune_empty() on function nodes that don't have an explicit simplifying function. This allows single-arg functions with no arg to be pruned rather than called with no args (causing errors if the single param does not have a default value).

4477 09/06/2012 03:54 PM Aaron Marcuse-Kubitza

xml_func.py: _if(): Documented that it must be run to remove conditions that functions._if() can't handle

4335 08/29/2012 08:06 PM Aaron Marcuse-Kubitza

xml_func.py: Added _first() simplifying function

4334 08/29/2012 08:05 PM Aaron Marcuse-Kubitza

xml_func.py: Added helper functions variadic_args() and map_names()

4326 08/29/2012 06:24 PM Aaron Marcuse-Kubitza

xml_func.py: Added _join() simplifying function

4322 08/29/2012 05:57 PM Aaron Marcuse-Kubitza

xml_func.py: passthru(): Use xml_dom.prune() so that after empty children are removed, the node itself is also removed if it's empty. This enables further pruning of any node that contains the pruned node.

4320 08/29/2012 05:52 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used prune() (use xml_dom.prune_children() instead)

4319 08/29/2012 05:51 PM Aaron Marcuse-Kubitza

xml_func.py: Use new xml_dom.prune_children()

4305 08/28/2012 07:51 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Removed no longer needed pass-through optimizations for XML functions, which are now handled by each function's own simplifying function

4304 08/28/2012 07:50 PM Aaron Marcuse-Kubitza

xml_func.py: Added _name simplifying function

4303 08/28/2012 07:48 PM Aaron Marcuse-Kubitza

xml_func.py: Added _alt, _merge simplifying functions

4302 08/28/2012 07:45 PM Aaron Marcuse-Kubitza

xml_func.py: passthru(): First prune the node

4301 08/28/2012 07:43 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Use new passthru()

4300 08/28/2012 07:43 PM Aaron Marcuse-Kubitza

xml_func.py: Added passthru()

4299 08/28/2012 07:36 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Use new prune()

4298 08/28/2012 07:36 PM Aaron Marcuse-Kubitza

xml_func.py: Added prune()

4243 08/27/2012 10:14 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Removed no longer needed hardcoded _if simplifying code now that there is an _if() simplifying function

4240 08/27/2012 10:09 PM Aaron Marcuse-Kubitza

xml_func.py: Added _if() simplifying function

4239 08/27/2012 10:07 PM Aaron Marcuse-Kubitza

xml_func.py: Added is_var_name() and is_var()

4237 08/27/2012 09:33 PM Aaron Marcuse-Kubitza

xml_func.py: Added _exists()

4236 08/27/2012 09:30 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Added support for custom simplifying functions, which are not hard-coded in simplify()

4230 08/27/2012 08:42 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Also remove _if statements with only a condition. This is a required transformation, because such _if statements can't be handled by functions._if() due to there being no argument to provide the anyelement type.

4229 08/27/2012 08:06 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Added pruning optimization that removes empty children. Empty children are created when some mappings don't apply to the current datasource.

4228 08/27/2012 07:58 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Only generate children list if node is a function

4227 08/27/2012 07:33 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Refactored to support processing nodes that are not functions. Changed var names for clarity.

4199 08/23/2012 04:58 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Also consider _name() to be an aggregate function

4198 08/23/2012 04:57 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Also consider _name() to be an aggregate function

4149 08/21/2012 06:16 AM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used _collapse()

4148 08/21/2012 06:13 AM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer needed _if(), which has been translated to a SQL function

4144 08/21/2012 05:42 AM Aaron Marcuse-Kubitza

xml_func.py: XML function specification documentation: Updated parameters

4143 08/21/2012 05:39 AM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer needed _eq(), which has been translated to a SQL function

4078 08/16/2012 04:21 PM Aaron Marcuse-Kubitza

xml_func.py: simplify(): Apply pass-through optimizations for _if statements with no condition (which means false). This faciliates automated testing after an _if statement has been added, because the put template provided as part of the automated test will only change for those datasources that actually have a condition entry for the _if statement, which greatly reduces the number of tests that need to be accepted. (Note that the path before the _if will still be included as an empty path if there are no other mappings to that table, because the _if statement does not surround it.)

4041 08/15/2012 05:51 AM Aaron Marcuse-Kubitza

xml_func.py: Added simplify()

4037 08/15/2012 05:36 AM Aaron Marcuse-Kubitza

xml_func.py: _map(): Don't remove None params, because are valid values and must be supported. This will become an issue once empty strings in text nodes are considered equivalent to None.

4036 08/15/2012 05:33 AM Aaron Marcuse-Kubitza

xml_func.py: _units(): Don't remove None params, because are valid values and must be supported. This will become an issue once empty strings in text nodes are considered equivalent to None.

4035 08/15/2012 05:25 AM Aaron Marcuse-Kubitza

xml_func.py: _name(): Fixed bug where needed to pass None values through and handle no name parts to properly support NULL propagation

4024 08/15/2012 03:14 AM Aaron Marcuse-Kubitza

xml_func.py: process(): Removed support for no longer used structural functions

4023 08/15/2012 03:13 AM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used structural functions

3940 08/10/2012 04:49 PM Aaron Marcuse-Kubitza

xml_func.py: _if(): Changed documentation about name param for distinguishing separate _if statements to use @name attribute instead, so that the XML/SQL function mechanism doesn't have to deal with code that's solely for XPath merging

3920 08/09/2012 01:40 PM Aaron Marcuse-Kubitza

lib/xml_func.py: _if(): Made then param optional, so that user can just map to the else branch as a shortcut for logically inverting the condition. (Note that a _not() XML function does not exist yet, so this is also a workaround.)

3802 08/06/2012 09:16 PM Aaron Marcuse-Kubitza

xml_func.py: _if(): Documented that can add `name` param to distinguish separate _if statements

3801 08/06/2012 09:08 PM Aaron Marcuse-Kubitza

xml_func.py: _if(): Made cond optional. When it's not specified or None, it is treated as False. This supports cases where all elements of the condition are required but not mapped to.

3799 08/06/2012 08:47 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used _simplifyPath(), which is now a built-in function of db_xml.put()

3798 08/06/2012 08:36 PM Aaron Marcuse-Kubitza

xml_func.py: _eq(): Documented that '' (empty node) is returned if a value was not mapped to, not if a value was None, since None arguments are no longer removed by process() (now XML functions do this manually with conv_items())

3797 08/06/2012 08:19 PM Aaron Marcuse-Kubitza

xml_func.py: _ref(): Only display "XPath reference target missing" warning if target node does not exist, not if it exists but is empty

3688 07/30/2012 06:04 PM Aaron Marcuse-Kubitza

xml_func.py: process(): In row-based mode, when trying to evaluate function using DB, preserve unknown funcs because these might be built-in functions of db_xml.put(). The sql.DoesNotExistException should be raised again when db_xml.put() is run and it verifies whether the function is built-in or not (e.g. _simplifyPath is now built-in, for column-based support). See db_xml.put_special_funcs for built-in functions.

3664 07/27/2012 09:56 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer needed local XML functions that have been translated to SQL functions

3660 07/27/2012 09:13 PM Aaron Marcuse-Kubitza

Use new exc.reraise() where exc.raise_() was used, so that the stack trace is preserved when the exception is rethrown

3640 07/27/2012 05:41 PM Aaron Marcuse-Kubitza

xml_func.py: process(): If local XML function can't be found, just replace with last param instead of returning an error. This allows DB-only functions to be ignored in XML output mode.

3631 07/26/2012 09:45 PM Aaron Marcuse-Kubitza

xml_func.py: Use conv_items() in every XML function that needs empty (NULL) entries removed, so that they are not dependent on what process() does to the items

3629 07/26/2012 08:55 PM Aaron Marcuse-Kubitza

xml_func.py: process(): In row-based mode, if function is not explicitly a relational function but does not exist as a local XML function, treat it as a relational function. This will help in merging sql_io.put() and put_table(), since put() did not support SQL functions but put_table() does, and this ensures that a SQL function is always used if the local XML function has been removed in favor of it.

3424 07/17/2012 08:08 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Changed rel_funcs param to a callback is_rel_func, so that caller can specify any dynamic function to determine if a name is a relational function rather than having to list out all known relational functions

3335 07/11/2012 08:02 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Merge mergeable siblings recursively so that newly-mergeable children are also merged

3333 07/11/2012 07:43 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Recombining pieces of nodes that were split apart in the mappings: Only combine nodes that are explicitly marked as mergeable, to avoid unwanted merges. Refactored to use new xml_dom.merge_by_name().

3327 07/11/2012 06:17 PM Aaron Marcuse-Kubitza

xml_func.py: process(): List out the xml_dom.NodeElemIter iterator so that it won't be affected by concurrent changes to the DOM tree

3326 07/11/2012 05:32 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Merging children: Support merging non-adjacent children by using new xml_dom.merge_same_name(). This should eliminate the need to sort children of the same name next to each other in the mappings so that they will be merged.

3227 07/05/2012 02:12 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Fixed bug where an evaluated XML function might create a node of the same name as an existing node, but these nodes would not be merged even though they referred to the same object, by merging siblings of a newly-evaluated (replaced) node if they have the same name

3077 06/26/2012 04:46 PM Aaron Marcuse-Kubitza

Moved Heuristic queries from sql.py to new sql_io.py

3046 06/22/2012 06:12 PM Aaron Marcuse-Kubitza

xml_func.py: _noCV: Fixed bug where assumed items was an iterator when it's now a list

3029 06/22/2012 04:11 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Added pass-through optimization for aggregating functions with one arg

3028 06/22/2012 04:02 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Call list() on the items' iterator so that its length can be determined wherever it's used without needing to call list() on it separately

2984 06/20/2012 09:05 PM Aaron Marcuse-Kubitza

Removed extra trailing whitespace

2602 06/04/2012 02:17 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Refactored to emphasize special handling for row-based and column-based modes. In row-based mode, always use a DB relational function over a local XML function when possible, to faciliate testing of DB relational functions in row-based mode. (The shadowed local XML version will still be tested in non-DB modes, such as outputting to intermediate XML files.)

2599 06/04/2012 12:41 PM Aaron Marcuse-Kubitza

xml_func.py: Removed no longer used strip()

2597 06/04/2012 12:39 PM Aaron Marcuse-Kubitza

xml_func.py: process(): Added strip()'s functionality via strip option

2558 06/01/2012 06:05 PM Aaron Marcuse-Kubitza

xml_func.py: Replaced xpath.get_1() with xpath.get_value() where possible, for simplicity

2557 06/01/2012 05:59 PM Aaron Marcuse-Kubitza

xml_func.py: strip(): Evaluate structural functions like _ignore and _ref by process() instead of removing them. Store structural functions' names in structural_funcs module var. This ensures that _ref targets are still expanded in column-based import.

2433 05/25/2012 03:21 PM Aaron Marcuse-Kubitza

xml_func.py: strip(): Added preserve param for XML functions not to remove

2112 05/07/2012 11:12 PM Aaron Marcuse-Kubitza

xml_func.py: Added is_func*() and is_xml_func*() and use them where their definitions were used

2105 05/07/2012 09:15 PM Aaron Marcuse-Kubitza

xml_func.py: process(): If DB with relational functions available (passed in via db param), call any non-local XML functions as relational funcs

2017 04/30/2012 09:13 AM Aaron Marcuse-Kubitza

xml_func.py: Added _ref to retrieve a value from another XML node

2016 04/30/2012 06:12 AM Aaron Marcuse-Kubitza

xml_func.py: Made all functions take a 2nd node param, which contains the func node itself

2014 04/30/2012 04:09 AM Aaron Marcuse-Kubitza

xml_func.py: _label: return None on empty input

2012 04/30/2012 03:40 AM Aaron Marcuse-Kubitza

xml_func.py: Added _collapse to collapse a subtree if the "value" element in it is NULL

2006 04/30/2012 12:30 AM Aaron Marcuse-Kubitza

xml_func.py: _simplifyPath: Also treat the elem as empty if the required node exists but is empty

1995 04/26/2012 06:52 PM Aaron Marcuse-Kubitza

xml_func.py: strip(): Remove _ignore XML funcs completely instead of replacing them with their values

1992 04/26/2012 06:09 PM Aaron Marcuse-Kubitza

xml_func.py: Added strip(). pop_value(): Support custom name of value param.