Joins with overlapping column names, nested results
See original GitHub issue@brianc https://github.com/felixge/node-mysql/#joins-with-overlapping-column-names It is possible to have a similar functionality in node-postgres? For example:
var config = {
text: '...',
values: ['...'],
nestTables: true
};
client.query(config, function(res) {
res.rows[0].tableA.id;
res.rows[0].tableB.id;
});
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
node.js - Escaping Queries with Options parameter for Joins ...
has an option for overlapping column names in table joins that looks like this: var options = {sql: '...', nestTables: true}; connection.
Read more >Merging 2 Queries with Overlapping Data - Microsoft Power BI ...
Solved: I have two queries that I'd like to merge together. They have the same columns. The problem is that 1 query has...
Read more >Configuring how Relationship Joins
Overlapping Foreign Keys¶. A rare scenario can arise when composite foreign keys are used, such that a single column may be the subject...
Read more >Working with Joins - Snowflake Documentation
The two joined tables usually contain one or more columns in common so that the rows in one table can be associated with...
Read more >Join Multiple Tool | Alteryx Help
Select and Deselect Fields/Columns ... To include a column in the dataset, check the check box to the left of the column name....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brianc A friend and I played around with postgres, and it actually is possible to have nested tables in
pg
, for example:With this all rows will be structured as such:
@brianc thanks mate! Your solution is the only one with 100% benefits!
For fellow googlers, this gives in knex: