Skip to content

nestTables options is not working #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pixelshaded opened this issue Jun 8, 2012 · 3 comments
Closed

nestTables options is not working #221

pixelshaded opened this issue Jun 8, 2012 · 3 comments

Comments

@pixelshaded
Copy link

For the life of me I cannot get the results to return keyed. Im running a LEFT JOIN on two mysql tables.

I'm trying to get raw queries to work in Railway JS. I know that railway uses a fairly outdated version of node-mysql for juggling DB. I've imported this version of node-mysql manually through the app_controller. I wonder if there is a conflict somehow.

I just need to know if Im crazy or not.

var query = 'SELECT * FROM games g LEFT JOIN game_multi_user_attributes mua ON g.id = mua.game_id WHERE g.deleted IS NULL';

var options = {sql: query, nestTables: true};

app.mysql.query(options, function(error, results) { console.log(results); });

@felixge
Copy link
Collaborator

felixge commented Jun 8, 2012

I've imported this version of node-mysql manually through the app_controller. I wonder if there is a conflict somehow.

How did you do that?

It's very likely you are using the wrong module version.

Can you do an: npm ls in your project dir?

@pixelshaded
Copy link
Author

we required it in the app controller. This is by default in railway js. It seems that in the lib / protocol / sequences / Query.js, that nestTables is hard coded to false in the Query function. Its not actually checking the options.nestTables.

@felixge felixge closed this as completed in 360748d Jun 9, 2012
@felixge
Copy link
Collaborator

felixge commented Jun 9, 2012

This was broken indeed and is fixed in master now. Thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants