sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL. (by launchbadge)

Stats

Basic sqlx repo stats
8
3,831
9.6
5 days ago

launchbadge/sqlx is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.

Sqlx Alternatives

Similar projects and alternatives to sqlx

  • GitHub repo rust-analyzer

    A Rust compiler front-end for IDEs

  • GitHub repo rust

    Empowering everyone to build reliable and efficient software.

  • GitHub repo Rustlings

    :crab: Small exercises to get you used to reading and writing Rust code!

  • GitHub repo Cargo

    The Rust package manager

  • GitHub repo sea-query

    A database agnostic runtime query builder for Rust

  • GitHub repo sdf_2d

    2D Signal Distance Field software (cpu) renderer

  • GitHub repo Godot

    Godot Engine – Multi-platform 2D and 3D game engine

  • GitHub repo tokio

    A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

  • GitHub repo actix-web

    Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

  • GitHub repo rayon

    Rayon: A data parallelism library for Rust

  • GitHub repo sled

    the champagne of beta embedded databases

  • GitHub repo rustfmt

    Format Rust code

  • GitHub repo rfcs

    RFCs for changes to Rust

  • GitHub repo hashes

    Collection of cryptographic hash functions written in pure Rust

  • GitHub repo refinery

    Powerful SQL migration toolkit for Rust.

  • GitHub repo tilapia

    Improving all Haskell's programmer interfaces

  • GitHub repo actix_sqlx_mysql_user_crud

    A user crud written in Rust, designed to connect to a MySQL database with full integration test coverage.

  • GitHub repo minos

    Tool to test OpenAPI spec files VS real implementations

  • GitHub repo ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  • GitHub repo reqwest

    An easy and powerful Rust HTTP Client

NOTE: The number of mentions on this list indicates mentions on common posts. Hence, a higher number means a better sqlx alternative or higher similarity.

Posts

Posts where sqlx has been mentioned. We have used some of these posts to build our list of alternatives and similar projects - the last one was on 2021-04-14.
  • Tiberius help
    reddit.com/r/rust | 2021-04-14
    Sqlx does something that sounds like what you want, but its' MSSQL support isn't the greatest. https://github.com/launchbadge/sqlx#compile-time-verification
  • Issue Migrating from SQLx 0.3.5 to 0.5.1
    reddit.com/r/rust | 2021-04-14
    Frankly, I have no idea what this means. I don't know what it's talking about regarding a reactor. The closest SQLx example I can find is this and besides the usage of #[async_std::main] over #[actix_web::main], I cannot find any stark differences.
  • Is there an asynchronous Hashmap or equivalent local DB?
    reddit.com/r/rust | 2021-04-13
    Note: What about a disk backed hashmap? You also mentioned maybe needing some local DB to store this data. I don't know the best approach here, but my first intuition is to try using sqlite with sqlx.
  • A tiny PostgreSQL implemented in Rust
    reddit.com/r/rust | 2021-04-10
    In our experience working on SQLx we've found a number of SQL servers that talk the Postgres protocol but are still difficult to integrate with, usually because they don't support prepared statements which SQLx's API pushes the user towards pretty strongly on purpose, or they have some idiosyncrasies that differ from Postgres: https://github.com/launchbadge/sqlx/issues/933
  • Hey Rustaceans! Got an easy question? Ask here (14/2021)!
    reddit.com/r/rust | 2021-04-06
    https://github.com/launchbadge/sqlx ?
  • Tagged Rusqlite: Simple, lightweight, SQL typing proof of concept
    reddit.com/r/rust | 2021-04-02
    Seems to be the same idea as sqlx.
  • Trying to utilize sqlx with postgresql and expecting performance on par with jdbc 😀. How do you guys do prepared statement, arg/param setting, batch insertions etc? The documentation doesn’t take me anywhere near that.
    reddit.com/r/rust | 2021-03-28
    Batch insert is not implemented yet, but a workaround is https://github.com/launchbadge/sqlx/issues/294#issuecomment-716092404
    reddit.com/r/rust | 2021-03-28
    You won't necessarily find a "prepare" method or anything like that. SQLx builds the idea of using prepared statements into its API. In the querying section:
  • Hey Rustaceans! Got an easy question? Ask here (11/2021)!
    reddit.com/r/rust | 2021-03-15
    Has anyone tried using rocket and sqlx together? I can't seem to get it working.
  • Recommendations on up-to-date videos to learn about async/futures?
    reddit.com/r/rust | 2021-03-09
  • Working with JSON across sqlx and async-graphql
    reddit.com/r/rust | 2021-02-28
    FYI SQLx does have built-in support for [JSON](https://github.com/launchbadge/sqlx/blob/master/sqlx-core/src/postgres/types/json.rs) if you're using Postgres.
    reddit.com/r/rust | 2021-02-28
    Thus far I've been loving working with sqlx and async-graphql. In general that's been a very smooth experience but yesterday I got a bit tripped up on something. Basically, I want to have a subfield of a struct that acts like plain old JSON. Here's a silly example:
  • Why Godot isn't an ECS game enginge
    reddit.com/r/gamedev | 2021-02-27
    On weakly typed it's a dict/object like those in JavaScript. On strongly typed you have either structural types or compile-time generated structs like ORMs do. See this Haskell example for code generation or how Rust can achieve compile-time safety for raw queries to structural types.
  • news.ycombinator.com | 2021-02-22
    > You can’t easily infer the return types of arbitrary SQL queries. To me, that highlights the different purposes of the languages.

    Most sufficiently ORMs can also give you this, and in other languages there are libraries that will compile-time-check the arbitrary SQL queries you write and won't compile if they're invalid. What you need to have that kind of thing work is sufficient type-checking power (Typescript offers this) and sufficiently rich metadata (there are some examples in the haskell[0] and rust[1] worlds). It wasn't necessary to throw away REST to get these kinds of benefits. I've been quite happy with TypeORM for example, and it would form a good base for this kind of effort -- I don't know a library that's already doing it, but this actually isn't as hard as you think, especially for the simple case.

    I'd argue that there is no difference (without too much evidence, to be fair, as I am not an expert in inner working of GraphQL) in the difficulty or parsing and validating a GraphQL query for the simple case (i.e. the actual subset of SQL that GraphQL represents) than actual SQL.

    [0]: https://hackage.haskell.org/package/postgresql-typed-0.6.1.2...

    [1]: https://github.com/launchbadge/sqlx

  • Hey Rustaceans! Got an easy question? Ask here (8/2021)!
    reddit.com/r/rust | 2021-02-22
    I'm not sure how to use the sqlx migrate command. I'm not super experienced with migrations so I may be missing something, but with other tools I've used I thought I would run something like that and it would create a migration file for me with the SQL scripts. With this, I run that and it's an empty file, and the docs say: Creates a new file in migrations/-.sql. Add your database schema changes to this new file.