Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 23, 2015
  1. cleaner fix for #140

    authored
  2. Merge pull request #142 from SimeonC/master

    authored
    Bug replaceSingleQuotes and dontQuote fix
Commits on Apr 25, 2015
  1. @jasonbaker

    Correct MySQL comment.

    jasonbaker authored
Commits on Apr 9, 2015
  1. @SimeonC
Commits on Apr 8, 2015
  1. @SimeonC

    replaceSingleQuotes and dontQuote fix

    SimeonC authored
    Fix for #140
Commits on Feb 8, 2015
  1. #115 - switch flavours

    authored
Commits on Feb 3, 2015
  1. merge master

    authored
  2. fix tests

    authored
Commits on Jan 31, 2015
Commits on Jan 29, 2015
  1. work towards params

    authored
  2. @pcothenet
Commits on Jan 19, 2015
Commits on Jan 18, 2015
  1. #53 - tests towards new block

    authored
  2. work towards #53

    authored
    added _sanitizeNestableQuery() method
Commits on Nov 24, 2014
  1. Fix for #105

    authored
Commits on Nov 13, 2014
Commits on Nov 9, 2014
  1. Fix for #97

    authored
Commits on Nov 8, 2014
  1. Fix for #101

    authored
Commits on Nov 7, 2014
  1. Fix for #102

    authored
Commits on Oct 28, 2014
  1. Bug fixes to toParam()

    authored
  2. @waterytowers

    Make the startAt numbering an options field

    waterytowers authored committed
    This makes the toParam parameter into an option field that temporarily overrides the current options with those passed in.  This should provide a more consistent and friendly interface.
  3. @waterytowers

    Allow param query inside where, JOIN condition, and expr

    waterytowers authored committed
    Added toParam support for expr() block when used in JOIN ON condition, or a where clause
    Added new tests for JOIN on Condition using expr()
    Added new tests for Expression block
    Fixed updated build script.  After changing the build script, the select.test.coffee file was not running due to a typo in the grunt file.
    
    There were some limitations with nesting a query, or expr() with a query, inside a where clause, or a JOIN condition and the use of toParam.  The nested queries were being converted to a string rather than doing a toParam, the string result was being added as the value for the parameter.  This is a potential sql injection risk.
    
    Now the nested/inline query when provided as a parameter will be in a where clause will replace the parameter '?' with the textual component of the nested query, and add any parameters from the nested query to the parent query.
    
    Example,
    
    subqry = squel.select().field('col3').from('table2').where('col5 = ?', 'test1')
    query = squel.select().field('col1').from('table1').where('col2 in ?', subqry)
    
    query.toParam() gives:
    
    { text: "SELECT col1 FROM table1 WHERE (col2 IN (SELECT col3 FROM table2 WHERE (col5 = ?)))",
    values: ['test1']
    }
    
    Previously it gave:
    
    { text: "SELECT col1 FROM table1 WHERE (col2 IN (?))",
    values: ['SELECT col3 FROM table2 WHERE (col5 = 'test1')']
    }
  4. @waterytowers
  5. @waterytowers

    Added new feature to allow union

    waterytowers authored committed
    Feature added to select query builder.
    
    squel.select().field('field1').from('table1').union(squel.select().field('field1').from('table2'))
    
    Fixes have also been applied to the mocha tests.  useFlavour was mixing the versions of select, update,... so tests would fail.  Now the flavour based tests force a reload of the squel module before each test.  Non-flavour based tests have been separated into their own test grouping and run first to prevent flavours from invalidating the test results.
    
    Updates:
    > A new UnionBlock has been created and added to the end of the select query builder.  Must be at the end to ensure the union statement occurs at the end of the first query.
    > toParam() for numbered parameters has been catered for by adding a new option that is passed to the sub-select query builder.  The nestedBuilder option is used internal to the builder to only update the query parameters with numbered parameters if it is the parent query builder.
    > Test cases added to select.test.coffee and postgres.test.coffee for union and toParam calls.
Commits on Sep 2, 2014
  1. @NikolayGalkin
Commits on Sep 1, 2014
  1. @NikolayGalkin

    Added full join

    NikolayGalkin authored
Commits on Aug 30, 2014
  1. Fix Order By block toParam()

    authored
  2. Fix #87

    authored
Commits on Aug 11, 2014
  1. update README

    authored
  2. Fix #85

    authored
  3. Merge remote-tracking branch 'SimeonC/master' into mssql

    authored
    Conflicts:
    	squel.min.js
  4. Merge branch 'master' into mssql

    authored
    Conflicts:
    	squel-basic.min.js
    	squel.min.js
Something went wrong with that request. Please try again.