Comments (6)
Hey @aperture147
I've just added support for join clauses in the latest v0.1.3 version
You can read the docs here
Let me know if you have any more suggestion
from workers-qb.
Hey @aperture147 I've just added support for multiple joins, checkout the docs here
https://workers-qb.massadas.com/advanced-queries/join/#multiple-joins
from workers-qb.
Hey @aperture147 I will be looking into adding support for this next week
Thanks for suggesting this 😄
from workers-qb.
fields: ['role', 'department', 'payroll.salary'],
returning the data in the same level of the object. Would it possible to have the salary
key in the payroll
object?
from workers-qb.
Thanks for your support! Is there any way to perform joining on multiple table? We can change
Line 139 in 37919e0
Join
object to an array of Join
? Eg:
_join(values?: Array<Join>): string {
if (!values || !values.length) return ''
let joinQuery = ''
values.forEach((item: Join) => {
const type = value.type ? ` ${value.type}` : ''
joinQuery += `${type} JOIN ${value.table} ON ${value.on}`
})
return joinQuery
}
This is a rough implementation to show the idea, sorry if it does not work.
from workers-qb.
Hey @subhendukundu that kind of result transformation should be handled in your application, workers-qb is only meant to generate sql queries
from workers-qb.
Related Issues (20)
- Migrations support? HOT 2
- Run prettier on project and commit HOT 1
- Adding support for UPSERT or ON CONFLICT HOT 1
- Syntax error on UPDATE HOT 3
- Advanced where clause showing an error HOT 2
- Order By's DESC/ASC not working HOT 1
- Bulk insert/update we need it HOT 8
- CURRENT_TIMESTAMP is being stored as string rather timestamp HOT 4
- LIKE function not working
- db.batch feature HOT 3
- UPSERT [new feature] HOT 2
- Numbered parameters don't work in miniflare HOT 1
- 0.1.8 HOT 3
- type definitions missing from v1.0.0 HOT 1
- sorry. please delete this issue
- Thanks and quick question about TIMESTAMP HOT 2
- How can I mark an insert as only returning one row?
- alias for main table? HOT 1
- Not null conditions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workers-qb.