Skip to content

Releases: synatic/noql

v1.1.14

05 Feb 08:04
276870c
Compare
Choose a tag to compare

Fixes:

  • Count (distinct col)
    select Category,count(distinct Rating) as cntDis,count(1) as cnt,max(`Rental Duration`) as maxDuration,min(`Rental Duration`) as minDuration,sum(`Length`) as sumLength,avg(`Length`) as avgLength from films group by Category
  • Aggregate functions in binary expressions
    select (max(`Length`) + max(`Replacement Cost`) + 1) * min(To_int(`Rental Duration`)) as totVal from films

Functions:

  • Extract on postgres

v1.1.12

01 Feb 08:12
9f7d8b9
Compare
Choose a tag to compare

Fixes

  • NOT LIKE returning empty match condition
  • Alias prefixing on expressions in select statement
    select filmId,(f.filmId + f.`Rental Duration` + 2) as val from films f where id>1

v1.1.10

31 Jan 12:47
64267fa
Compare
Choose a tag to compare

Enhancements

  • Added join hint OPTIMIZE which works for simple sub select joins to move the on before other expressions
    The $match on sub query joins is applied after the subquery pipeline which can cause performance issues since indexes may not be used. It may be better to put the match before the pipeline to limit the input set depending on the on conditions.
    select c.*,cn.* from customers c inner join (select * from \`customer-notes\` where id>2) \`cn|optimize\` on cn.id=c.id
    If the on uses a computed column it may not be possible:
    select c.*,cn.* from customers c inner join (select sum(id,1) as id from \`customer-notes\` where id>2) \`cn|optimize\` on cn.id=c.id
    will return invalid results since the join field is computed

  • Added hint chaining for future use cases:
    select c.*,cn.* from customers c inner join (select * from \`customer-notes\` where id>2) \`cn|optimize|first\` on cn.id=c.id

v1.1.9

31 Jan 07:09
6f39dab
Compare
Choose a tag to compare

Enhancements

  • join hints on AS to support sub queries (FIRST,LAST,UNWIND)

select c.*,cn.* from customers c inner join (select * from `customer-notes`` where id>2) `cn|first` on cn.id=c.id

v1.1.8

30 Jan 13:02
dda42a9
Compare
Choose a tag to compare

Fixes:

  • STRPOS 1 based index as per Postgres

Enhancements

  • NOT query support
    select * from films where NOT (Title = 'Test' or Title = 'test2')

New Functions

  • LOCATE MySQL function

v1.1.7

29 Jan 13:20
3359854
Compare
Choose a tag to compare

Functions:

  • STRPOS
  • STARTS_WITH
  • ILIKE on PostgresQL

Dev:

  • Add database option to tests

v1.1.6

27 Jan 11:17
1054197
Compare
Choose a tag to compare

Fixes:

  • number and boolean literal in select
    select 1 as c0, filmId from films

v1.1.5

27 Jan 07:26
620f552
Compare
Choose a tag to compare

Fixes:

  • IS NULL and IS NOT NULL on Case statements
  • canQuery not allowed with table aliases
  • Match before project when using table aliases
  • Auto column prefix when no prefix specified to first table alias if specified
    select f.filmId,Title from films f where f.Title = 'Test' and Name = 'Test'

v1.1.4

25 Jan 20:57
625afb1
Compare
Choose a tag to compare

Fixes:

  • count(1) throwing an error

v1.1.3

25 Jan 18:47
e641084
Compare
Choose a tag to compare

Fixes:

  • PostgresQL DISTINCT clause not working
  • "NOT column IS NULL" clause
  • "column IS NULL" clause
  • Aggregate functions auto group e.g. "select cum(col1) as s from customers" would not automatically group as per normal SQL behaviour.

New features:

  • unsetId option on makeMongoAggregate so that if _id is not specified in the SELECT then it is removed from the results. Some drivers don't like an unknown column coming back.