Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
isuru89 committed Apr 14, 2017
2 parents c5f9bbb + 5897a99 commit 5281291
Show file tree
Hide file tree
Showing 45 changed files with 1,158 additions and 620 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
## NyQL Changelog

#### 1.1.1
### v1.1.2
* [Features and Bug fixes](https://github.com/VirtusaPolarisGTO/NyQL/issues?q=is%3Aissue+milestone%3Av1.1.2+is%3Aclosed)

#### v1.1.1

* [Bug fixes](https://github.com/VirtusaPolarisGTO/NyQL/issues?q=is%3Aissue+milestone%3Av1.1.1+is%3Aclosed)


#### 1.1
#### v1.1
All batch related operations accept its data within the map in key name of '__batch__'
instead of previously used key 'batch'.

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.virtusa.gto.nyql</groupId>
<artifactId>nyql-parent</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 6 additions & 0 deletions core/src/main/groovy/com/virtusa/gto/nyql/QuerySelect.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class QuerySelect extends Query {

List<Object> orderBy = null
List<Object> groupBy = null
boolean groupByRollup = false
Where groupHaving = null
List<Object> projection = null
Table _intoTable = null
Expand Down Expand Up @@ -74,6 +75,11 @@ class QuerySelect extends Query {
this
}

QuerySelect ROLLUP() {
groupByRollup = true
this
}

QuerySelect HAVING(@DelegatesTo(value = Where, strategy = Closure.DELEGATE_ONLY) Closure closure) {
Where whr = new Where(_ctx)

Expand Down
4 changes: 4 additions & 0 deletions core/src/main/groovy/com/virtusa/gto/nyql/Table.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class Table {
__alias != null
}

Column COLUMN_AS(String name) {
COLUMN_AS(name, null)
}

Column COLUMN_AS(String name, String alias) {
Column column = new Column(__name: name, __alias: alias, _owner: this, _ctx: _ctx)
__allColumns.put(name + '::' + alias, column)
Expand Down
11 changes: 6 additions & 5 deletions core/src/main/groovy/com/virtusa/gto/nyql/Where.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,14 @@ class Where implements DataTypeTraits, FunctionTraits, ScriptTraits {
this
}

@Deprecated
@CompileStatic
Where NOTIN(Object c1, Object... cs) {
NIN(c1, cs)
}

@CompileStatic
Where NIN(Object c1, Object... cs) {
if (cs != null) {
List list = new LinkedList()
QUtils.expandToList(list, cs)
Expand All @@ -216,11 +222,6 @@ class Where implements DataTypeTraits, FunctionTraits, ScriptTraits {
this
}

@CompileStatic
Where NIN(Object c1, Object... cs) {
NOTIN(c1, cs)
}

QResultProxy QUERY(@DelegatesTo(value = QuerySelect, strategy = Closure.DELEGATE_ONLY) Closure closure) {
QuerySelect querySelect = new QuerySelect(_ctx)

Expand Down
Loading

0 comments on commit 5281291

Please sign in to comment.