Giter Club home page Giter Club logo

pysqlx-engine's Issues

[engine] - performance tests

Create benchmark tests using any driver vs pysqlx-engine

PostgreSQL.

  • sync - psycopg2
  • async - asyncpg

MySQL

  • sync - mysql-connector-python
  • async - aiomysql

SQLite

  • sync - sqlite3
  • async - aiosqlite

MS SQL Server

  • sync - pyodbc

Test Topics

  • pysqlx-engine VS psycopg2
  • pysqlx-engine VS asyncpg
  • pysqlx-engine VS mysql-connector-python
  • pysqlx-engine VS aiomysql
  • pysqlx-engine VS sqlite3
  • pysqlx-engine VS aiosqlite
  • pysqlx-engine VS pyodbc

PostgreSQL - Error when "column" is a type 'void'

Hey guys,

I try to use quaint in a simple benchmark where the database has a lag/delay in response.
So I'm using pg_sleep to simulate this delay.

But with this command returning a void, Quaint has an error.

In that case, would it be better to deserialize to null?

DB: PostgreSQL
Rust: 1.64.0
Quaint: https://github.com/prisma/quaint

Example:

// query
let sql = "SELECT pg_sleep(0.1);";

// quaint connection
let conn = Quaint::new("postgresql://postgres:postgrespw@localhost:49153").await.unwrap();

// run query
let result = conn.query_raw(sql, &[]).await.unwrap();

Error: Column type 'void' could not be deserialized from the database.

issue link: prisma/quaint#414

[engine] - write unittest

Write the unitest to sync and async engine.

  • unit test to sync
  • unit test to async
  • run coverage 100%

PostgreSQL - Could not convert value to IpAddr

Description

I ran a query_raw where the PostgreSQL column is of type CIDR or MacAddr but I got this error.

This message is in the src/ast/values.rs file, line 788.

Value in column: 192.168.100.128/25 and 08:00:2b:01:02:03

Error

CIDR
Error querying the database: error deserializing column 24: cannot convert between the Rust type core::option::Option<std::net::ip::IpAddr> and the Postgres type cidr

MacAddr has the same problem
Column type 'macaddr' could not be deserialized from the database.

issue core link: prisma/quaint#416

[engine] - expose pysqlx-core including doc

With pysqlx-core implemented, now let's expose the features and include documentation with example usage.

  • expose methods
  • implement pydantic parse
  • include error mapping
  • support sync and async
  • include documentation function

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.