Giter Site home page Giter Site logo

sprattus's People

Contributors

djc avatar dutchmartin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

djc mo-rijndael

sprattus's Issues

Connection pooling

We want to be able to use sprattus in a high performance web application. Therefore, connection pooling and maybe combining that with pipe-lining makes a lot of sense to do.

To come to an implementation, the following points are the concrete todo's:

  • Look at the existing connection pooling solutions and find one that is async
  • implement an async connection pool if it does not exits yet.
  • Add support for sprattus and create benchmark results.

Add SSL/TLS support

Currently, we use the NoTls option of tokio-postgres. However, it would be nice to have SSL/TLS support as a option. To achieve that, a new constructor method that accepts the implementations that tokio-postgres already have available.

Name for the crate

Currently, the name of the project is 'profugus'. This name is intended to be temporary.
Therefore, we need a new name so we can release the crate with that name.

The current suggestions are:

  • Sprat
  • Loach
  • Perch
  • Pollock
  • Anchovy
  • Tetra
  • Tuna
  • Salmon

The observant reader probably noted that the suggested names all are fish that swim asynchronously from each other. And that is correct.

Namespace macro output

Instead of only writing Result<Self, Error>, write Result<Self, Sprattus::Error>
In this way, we overcome the problem of ambiguous naming, since other crates also have error types.

Remove the dependancy on strfmt

For some methods, we currently use the strfmt crate to generate sql query's. This seems unnecessary since the format macro can do this job too. Using the format macro will also reduce the amount of allocations needed which in result will improve performance.

Query builder

Currently, there is no way to fetch data from the database without writing SQL. Therefore we want to have a way to query more easily.
An idea for the api would be this:

let products = connection.select::<Product>().limit(10).orderAsc().await?

For complex query's, using SQL will be the preferred option, since a query builder can not provide all functions.

Create examples

Currently, the sprattus-test crate tests the library, but does not show how the library works with well documented examples. Therefore, having a examples directory would help users getting onboard

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.