Skip to content

Commit

Permalink
Fix README and Alias::field
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr committed Dec 7, 2011
1 parent 09e4763 commit 90c98b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ q.execute pool, (err, res) ->
q = select.from ArtWTF: "a_real_table_with_twenty_fields"

# Works with joins as well
q = q.join {so: 'some_other'}, on: {hard: q.rels('ArtWTF').field('is_it')}
q = q.join {so: 'some_other'}, on: {hard: q.rel('ArtWTF').field('is_it')}

# Field aliasing
# SELECT t.really_long_field AS 'rlf' FROM long_table AS t
Expand Down
1 change: 1 addition & 0 deletions src/nodes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ exports.Alias = class Alias extends Node
constructor: (@obj, @alias) ->
copy: -> new @constructor copy(@obj), @alias
project: (name) -> new Projection @, name
field: -> @project arguments
ref: -> @alias

Alias.getAlias = (o) ->
Expand Down

0 comments on commit 90c98b6

Please sign in to comment.