Comments (4)
Ah sorry for the confusion, this is because raw queries are specific for your database provider and these examples were initially written to target sqlite
and I missed updating the raw queries when it was switched to PostgreSQL, thanks for catching this!
from prisma-client-py.
@ezorita Oh no, sorry if that wasn't clear, it is absolutely available, every database supported by Prisma supports safe raw query parameters. For PostgreSQL you have to use $n
, e.g.
total = await db.execute_raw(
'''
SELECT *
FROM User
WHERE "User".id = $1
''',
'cksca3xm80035f08zjonuubik'
)
from prisma-client-py.
Awesome, thanks for clarifying!
from prisma-client-py.
Thanks for your reply, Robert. I understand then that injectrion-proof parameter replacement is not available currently for postgresql queries?
from prisma-client-py.
Related Issues (20)
- Improve error message for http timeouts
- Select method on client HOT 1
- Can't get rid of `recursive_type_depth` warning HOT 8
- Cannot create single records in simple time series on mysql, but create many works HOT 3
- Deprecating the mypy plugin HOT 1
- Compatibility with Vercel HOT 4
- Generator cannot start HOT 4
- Add support for always including 1-1 relational fields
- `db pull` overwrites the Python client generator nondeterministically HOT 2
- Limiting generators not working as documented (--generators=), but --generator does work HOT 1
- connect() fails if /etc/os-release is not available
- Add fail-safe for downloading binaries. HOT 7
- Refactor internal query builder to use the JSON protocol
- Incorrect naming convention on generated client
- Support default values for enum arrays
- Add support for `Prisma.JsonNull` equivalent
- Adding Example for FastApi OpenAPI documentation HOT 4
- Improved seeding support HOT 1
- Support Prisma TS's `findUniqueOrThrow` HOT 1
- Audit usage of `Any` throughout the code base
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 prisma-client-py.