Coder Social home page Coder Social logo

Comments (1)

filipton avatar filipton commented on June 5, 2024 1

I know I can just use sqlx to query planetscale db ,

What is the difference of using this package?

aside it uses HTTP api of planetscale.... and the query builder you created?

Soo my crate has much less features than SQLX, and it only supports planetscale.

Why would i use this? what use case? would it fit... i see this is a database-js counter part in rust which is built for serverless websites

Yep, like the database-js its only viable to use this on serverless - i don't see any reason to use it outside the serverless environment. So if you aren't making a serverless website i think you should look somewhere else (SQLX).

Any performance, benchmark comparison vs http and direct db connection with sqlx?

I don't have any, but i can say that accessing DB through HTTP API would be much slower then "raw" db connection with sqlx (http connection establishment for each query)

on query builder whats difference on sqlx?

My querybuilder does simple "find and replace" - it looks for $X sequences, gets index (X) and then just replaces it with bounded variable (these variables are escaped). I don't think SQLX does that in any different way but i might be wrong.

Also , why not just extend on sqlx , and build on top of it? like error handling on Vitest...

I think it would took too much time for that nich usecase (maybe it isn't nich - idk)

I hope I can have broader info , im highly interested on using planetscale on my next project...

and I wanna know if just sqlx if enough and do i need to use this package (if recommended)

As i mentioned above, if you aren't using serverless this crate is useless for you. SQLX is enough for you if you are planning to deploy your app on for example bare-metal (planetscale is mysql compatiable)

I hope i brighten to you use case of this crate, and now you know what will you use for your project :D

from planetscale-driver.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.