Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@vzqzac Yeah I do that but the error I got was a simple syntax error while one of the insert params was an object, which should throw some kind of row count error but not the thing I got
-
vzqzac7598y@linuxxx object-relational mapping, a programming technique that can help you with this issue, most popular library for node and SQL databases is sequelize, but there are plenty of them
-
puerto3348yhere's where they tell u there's something that's gonna make ur life better. but it may not. but it maaaay. :)
-
puerto3348y@linuxxx in this case, looks like sequelize. which btw, I hear is very good. I'm still Chucking normal old sql queries like u, I'm fine with it but u gotta do what works for u. just make sure it's not injectable. good luck either way.
-
@puerto Tbh, next to programming I'm the main cyber sec guy so making sure it's not injectable is always my first prio :)
-
MySQL has strict mode.
Activate it.
Has nothing to do with ORM at all... Nothing.
MySQL ignores all errors if no strict mode configuration applies and, what makes it worse, strict mode or better SQL mode as MySQL calls it, can be overridden per session / connection, so make sure nothing interferes.
This is database specific, the ORM can help little to none.
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
rephiscorth38Everyone here ranting about a fucking missing semicolon. I can't remember the last time a missing semicolon wa...
-
MoboTheHobo35My Friend: Dude our Linux Server is not working anymore! Me: What? What did you do? My friend: Nothing I swe...
It would be really FUCKING great if NodeJS or mysql could give me a FUCKING shout or ERROR MESSAGE when one of the parameters I'm giving is not the RIGHT FUCKING DATA TYPE INSTEAD OF THROWING A RANDOM ERROR THAT DOESN'T INDICATE A WRONG MOTHERFUCKING DATA TYPE. Five FUCKING hours of debugging later.
undefined
node
fucking
mysql
nodejs
fml
fuckity
fuck