rockdai / sql-bricks

Transparent, Schemaless SQL Generation
http://csnw.github.io/sql-bricks
MIT License
213 stars 25 forks source link

Support for NATURAL JOIN (on top of JOIN USING) #67

Closed sneakertack closed 9 years ago

sneakertack commented 9 years ago

Addresses #64 and #66.

@prust I've gone with your recommendation of still leaving the join criteria mandatory, except on cross join.

Here are the nuances of this commit:

// Criteria discard example.
sql.select().from('t1').crossJoin('t2').on({'foo':'bar'})
/* SELECT * FROM t1 CROSS JOIN t2 */

Note that this branch is based off the join-using branch.

prust commented 9 years ago

@sneakertack: Great work! I'm impressed that you added documentation & tests and that all of it (implementation, docs & tests) is in keeping with the styles and conventions of the project. Thank you!!

prust commented 9 years ago

@sneakertack: FYI, this has been pushed to npm as 1.2.0