From: James Moger Date: Thu, 23 Oct 2014 01:56:32 +0000 (-0400) Subject: Documentation X-Git-Tag: v1.3.0~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c76b61f7c0873567507a705726cf86b58e0e59e;p=iciql.git Documentation --- diff --git a/releases.moxie b/releases.moxie index 47e06d3..a21662e 100644 --- a/releases.moxie +++ b/releases.moxie @@ -5,7 +5,11 @@ r21: { title: ${project.name} ${project.version} released id: ${project.version} date: ${project.buildDate} - note: "If you are upgrading and using EnumId mapping you will have to update your models to define the target class for the enumid mapping." + note: '' + If you are upgrading and using EnumId mapping you will have to update your enums to define the target class for the EnumId interface since it is now generified. + + Switching to using generic types with the EnumId interface allows you to implement alternative enum-type mappings which may make more sense for your business logic. + '' html: ~ text: ~ security: ~ @@ -16,8 +20,8 @@ r21: { changes: - Revised EnumId interface to support generic types (pr-6) additions: - - Add syntax for IN and NOT IN (pr-7) - - Add support for nested AND/OR conditions (pr-8) + - Add syntax oneOf/noneOf for IN and NOT IN (pr-7) + - Add support for compound nested AND/OR conditions (pr-8) - Add support for mapping SQL BOOLEAN to primitive numeric types, not just object numeric types - Add support for customizing EnumId mapping, you can now map enum constants to values of your choice as long as they are a standard type dependencyChanges: diff --git a/src/site/jaqu_comparison.mkd b/src/site/jaqu_comparison.mkd index 3b060e5..b37addb 100644 --- a/src/site/jaqu_comparison.mkd +++ b/src/site/jaqu_comparison.mkd @@ -18,6 +18,8 @@ This is an overview of the fundamental differences between the original JaQu pro dynamic queriesmethods and where clauses for dynamic queries that build iciql objects-- DROPsyntax to drop a table or view BETWEENsyntax for specifying a BETWEEN x AND y clause-- +(NOT) INsyntax (oneOf, noneOf) for specifying a (NOT) IN clause-- +compound nested conditionsWHERE (x = y OR x = z) AND (y = a OR y = b)-- types primitivesfully supported-- enumsfully supported-- @@ -29,4 +31,4 @@ This is an overview of the fundamental differences between the original JaQu pro DEFAULT valuesset from annotation, default object values, or Define.defaultValue()set from annotations Interface Configuration
Mapped Fieldsall fields are mapped regardless of scope
fields are ignored by annotating with @IQIgnoreall public fields are mapped
fields are ignored by reducing their scope Index namescan be set-- - \ No newline at end of file + diff --git a/src/site/usage.mkd b/src/site/usage.mkd index b09f91b..21c262e 100644 --- a/src/site/usage.mkd +++ b/src/site/usage.mkd @@ -82,25 +82,13 @@ final Customer model = new Customer(); // AND ( // region = 'LA' OR region = 'CA' // ) -List regionals = - db.from(model) - .where(model.customerId).isNotNull() - .and(model.region).isNotNull() - .and(new Or(db, model) {{ - or(model.region).is("LA"); - or(model.region).is("CA"); - }}); - -List regionalType1s = - db.from(model) - .where(new And(db, model) {{ - and(model.type).is(1); - and(new Or(db, model) {{ - or(model.region).is("CA"); - or(model.region).is("LA"); +List regionals = db.from(model) + .where(model.customerId).isNotNull() + .and(model.region).isNotNull() + .and(new Or(db, model) {{ + or(model.region).is("LA"); + or(model.region).is("CA"); }}); - }}); - ---JAVA--- ### Finding Matches for a List of Values