Comments (2)
There isn't; squel is simply an SQL string builder.
To execute raw SQL, send it directly to your DB connection. E.g. if you're using https://github.com/mysqljs/mysql, something like this works:
const mysql = require('mysql')
const connection = mysql.createConnection({ ... }).connect()
connection.query('SELECT * FROM tbl', (error, results, fields) => {
...
})
If your function expect squel objects, you could try to reverse engineer the method(s) they end up calling and pass an object that implements those. Perhaps simply implementing toString()
(returns your SQL string) would do the trick?
from squel.
If it doesn't further compose your query you can fake it by doing something like this:
const fakeSquel = { toString(){ return 'SELECT * FROM table'; }};
from squel.
Related Issues (20)
- Add option to add column/table name as a parameter HOT 1
- Add semantic-comparison logic for queries/expressions
- Feature request: Placeholders in the squel.case(...) expression?
- MSSQL Boolean type
- .group().having() is not a function HOT 1
- string escape is incorrect, especially when string contains \n or ', which may cause SQL injection HOT 1
- How to select into array? HOT 1
- Scalar values aliasing
- squel.select().from is undefined after minimizing HOT 6
- Numbered parameters in postgres flavour are substituted inside a string literal
- Incorrect syntax near '`'.
- SQL Server Update Fails with Trigger ? HOT 3
- Can you get the result value from an object like the result map of mybtis?
- SQL Server Select HOT 1
- Interested in Becoming an Active co-maintainer HOT 1
- How to use IGNORE in INSERT in mysql?
- Mark as deprecated HOT 1
- Grouping conditions together in expression HOT 1
- Lateral Joins
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 squel.