DEV Community

I'm Building an ORM for Deno!

Rahman Fadhil on May 29, 2020

Hey developers! I hope you're doing well. I just want to let you know that I'm currently working on an open-source project which I think is really...
Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Cool.

One thing that comes to mind is -- how do build the SQL builder? How do you make identifier always valid? What about protection against SQL injection?

Another thing is JSON querying support. Aren't the syntaxes different across SQL providers?

This was my experience, github.com/patarapolw/liteorm

Collapse
 
rahmanfadhil profile image
Rahman Fadhil

What a nice project!

The query builder is pretty simple at this point, every method in that class returns this, so that you can chain multiple methods like where, first, and select to get the result that you want.

Security is one of my concerns too, but it's a bit challenging. For now, I'm trying to implement the minimum requirement for preventing SQL injection by escaping user inputs on my query builder.

If you know anything to improve security on an ORM, I would love to know!

Collapse
 
juliusdelta profile image
JD Gonzales

Wow this is really cool. I'm super interested in maybe contributing. Any plan or ideas as far as a CLI or migration management? (I'm spoiled from using Active Record for so long :P)

Collapse
 
rahmanfadhil profile image
Rahman Fadhil

Thanks a lot! ❀️

I actually have a plan to do that! However, there are some features that we need to implement first before going into that. Things like the query builder and other CRUD features are crucial too. So let's work on that together! πŸ’ͺ

Collapse
 
siy profile image
Sergiy Yevtushenko

I'd suggest to take a look into JOOQ. While it's a Java library, most likely you will find a lot of useful ideas and inspirations for you project.

Collapse
 
rahmanfadhil profile image
Rahman Fadhil

This is what I was looking for, thanks!

Collapse
 
drepram profile image
Andre Christoga Pramaditya

Thank you Fadhil, very cool!

Collapse
 
drepram profile image
Andre Christoga Pramaditya

Thank you Fadhil, very cool!

Collapse
 
drepram profile image
Andre Christoga Pramaditya

Thank you Fadhil, very cool!

Collapse
 
jdriesen profile image
Johnny Driesen

Super interesting project, and I like your Laravel approach.
Success, mate !

Collapse
 
rahmanfadhil profile image
Rahman Fadhil

Thanks!

Collapse
 
ben profile image
Ben Halpern

Cool!

Collapse
 
selllami profile image
Yassine Sellami

Cool! Very interesting.