Adam Heath
33809facfe
TESTS: Start adding low-level object unit tests.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981625 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:49 +00:00
Adam Heath
c9f9555c25
No longer use ON in relation settings; instead, use MAP, which makes the
...
sql a little bit simpler.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981624 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:39 +00:00
Adam Heath
1581156412
TESTS: Test reparsing of all statements.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981623 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:33 +00:00
Adam Heath
a9aa86c234
BUG FIX: OFFSET/LIMIT have to be after ORDER BY/GROUP BY.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981622 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:28 +00:00
Adam Heath
1fc630261e
BUG FIX: Fix toString with multiple RELATION, they should not be
...
separated by commas.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981621 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:23 +00:00
Adam Heath
3ade64a656
OPTIMIZE: KeyMap no longer extends Atom, so no longer has any appendTo variants.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981620 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:17 +00:00
Adam Heath
0864fca12f
BUG FIX: Fix multiple keymaps in a relation, wasn't separated by AND.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981619 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:11 +00:00
Adam Heath
bc6a4b7870
Introduce a new method, getDefaultName(), so that null alias logic
...
doesn't happen in the constructor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981618 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:06 +00:00
Adam Heath
f8e091775c
FEATURE: Make public wrappers around several internal methods.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981617 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:42:00 +00:00
Adam Heath
3929451368
FEATURE: Create a new StaticValue function, based on the contents of
...
FieldDef.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981616 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:41:55 +00:00
Adam Heath
81a56ac59c
REFACTOR: Move FieldAll call to a new function, SelectField.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981615 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:41:50 +00:00
Adam Heath
e544bd6be0
REFACTOR: Optimize select AS support, so it is only required in one place.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981614 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:41:44 +00:00
Adam Heath
806332cc89
REFACTOR: Optimize FieldDef, so that the FieldDef object instantiation only
...
happens in one place.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981613 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:41:39 +00:00
Adam Heath
b98105c65f
REFACTOR: Abstract out FieldAll so it can be called externally.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981612 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:41:34 +00:00
Adam Heath
54c6cb0f16
FEATURE: Add static valueOf methods.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981611 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:41:28 +00:00
Adam Heath
0038f309a5
FORMAT: Re-indent; couldn't find a standard for indentation, so this is an
...
attempt to have some sort of common pattern for doing so.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981610 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:41:23 +00:00
Scott Gray
4448c4a866
No functional changes, just removing a whole bunch of unused imports and reorganizing them along the way.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981019 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 08:28:34 +00:00
Adam Heath
cbd11cf3b0
Revert wrongly committed 950258
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950277 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 22:00:26 +00:00
Adam Heath
69c2d455f3
sql foo
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950258 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 21:46:44 +00:00
Adam Heath
feef6caffc
Use the new equals implementations to test for a correct parse; also
...
test all the statements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949609 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:10 +00:00
Adam Heath
17d8151d34
Allow fieldAlls, fieldDefs, and relations to be null; if they are empty,
...
then force them to null instead.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949608 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:04 +00:00
Adam Heath
a24bab15cf
Only output the alias if it is not the same as the default name.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949607 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:58 +00:00
Adam Heath
40cff7fd7b
Implement equals() in a bunch of places.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949606 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:53 +00:00
Adam Heath
69de194305
Convert operators to lowercase in the constructors that have them,
...
instead of only during parsing; this fixes instances where the objects
are not constructed by the sql parser.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949605 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:42 +00:00
Adam Heath
4a31886e82
Fix operator parsing; only the last character was being parsed as the
...
operator.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949604 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:36 +00:00
Adam Heath
ddb9bf8b27
Remove FieldDefFieldValue, and merge FieldDefValue into FieldDef.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949603 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:31 +00:00
Adam Heath
8c083d6743
Make the Order enum public.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949602 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:23 +00:00
Adam Heath
39ee8befa9
Start adding DISTINCT support to SELECT.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949600 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:17 +00:00
Adam Heath
36bed586b9
Add support for several count function variants.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949599 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:11 +00:00
Adam Heath
95949ff2b7
Add <test-jar> macro.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935381 13f79535-47bb-0310-9956-ffa450edef68
2010-04-18 18:03:47 +00:00
Scott Gray
6109808c8a
Tabs to spaces
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924378 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:28:01 +00:00
Adrian Crum
24922db654
Created a new Java package - org.ofbiz.base.lang - which is intended to be used as a home for basic Java types. Moved some basic Java type classes into the new package.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916987 13f79535-47bb-0310-9956-ffa450edef68
2010-02-27 16:48:32 +00:00
Jacopo Cappellato
75a3c9f270
Added a bunch of missing license headers; we'll have to pay more attention on this in the future.
...
Still some work needs to be done in order to have the codebase inline with the ASF policies as it used to be.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907413 13f79535-47bb-0310-9956-ffa450edef68
2010-02-07 11:24:45 +00:00
Adam Heath
b17eb127ec
Fix trailing whitespace, and mixed tab/space at the beginning of lines.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@899812 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 21:00:23 +00:00
Adam Heath
eb0f0bfb16
Fix several generics warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@898090 13f79535-47bb-0310-9956-ffa450edef68
2010-01-11 22:21:12 +00:00
Adam Heath
276cc7b501
Add a default-javadoc presetdef.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894038 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 01:01:39 +00:00
Adam Heath
693c05aacd
Fix javadoc calls.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894025 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 22:18:20 +00:00
Adam Heath
47b0a876ed
Switch all javac15 to javac16.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894022 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 22:12:04 +00:00
Adam Heath
dfc631e2ed
Start actually doing real testing.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893082 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:11:53 +00:00
Adam Heath
3aefa8e81f
Use the alternate FieldValue when no table alias is used.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893081 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:11:24 +00:00
Adam Heath
2392b1e5cc
Make alias optional for function calls and math value field definitions.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893080 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:11:00 +00:00
Adam Heath
0e7872abef
It turns out that all current uses of this are actually with
...
StaticValues.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893079 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:10:33 +00:00
Adam Heath
8626985652
Start of visitor support.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893078 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:09:55 +00:00
Adam Heath
cdec74a809
Fix alias-based fielddef parsing.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893076 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:08:15 +00:00
Adam Heath
3959e34c47
Bunch of sql stmts and other commands that provide for more coverage.
...
Still not actually testing the output, other than printing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892706 13f79535-47bb-0310-9956-ffa450edef68
2009-12-21 06:05:21 +00:00
Adam Heath
be3e008240
Support MathValue for field definitions.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892705 13f79535-47bb-0310-9956-ffa450edef68
2009-12-21 06:04:47 +00:00
Adam Heath
c66af181b1
MathValue now supports constants.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892704 13f79535-47bb-0310-9956-ffa450edef68
2009-12-21 06:04:09 +00:00
Adam Heath
bed7885f78
StaticValues are constant.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892703 13f79535-47bb-0310-9956-ffa450edef68
2009-12-21 06:03:33 +00:00
Adam Heath
dad8c988e6
Add TYPE and TITLE keywords to string output.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892702 13f79535-47bb-0310-9956-ffa450edef68
2009-12-21 06:02:57 +00:00
Adam Heath
5706e76dbe
Switch all IllegalArgumentException to ParseException.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892701 13f79535-47bb-0310-9956-ffa450edef68
2009-12-21 06:02:24 +00:00