All Projects → amphp → Mysql

amphp / Mysql

Licence: other
Async MySQL client for PHP based on Amp.

Projects that are alternatives of or similar to Mysql

Http Server
A non-blocking HTTP application server for PHP based on Amp.
Stars: ✭ 1,122 (+377.45%)
Mutual labels:  async, amphp
Acme
Async ACME library written in PHP based on the Amp concurrency framework.
Stars: ✭ 102 (-56.6%)
Mutual labels:  async, amphp
Sync
Synchronization primitives for PHP based on Amp.
Stars: ✭ 67 (-71.49%)
Mutual labels:  async, amphp
Demo Chat
A small demo chat based on Aerys.
Stars: ✭ 18 (-92.34%)
Mutual labels:  async, amphp
Socket
Non-blocking socket and TLS functionality for PHP based on Amp.
Stars: ✭ 122 (-48.09%)
Mutual labels:  async, amphp
Mysqlconnector
Async MySQL Connector for .NET and .NET Core
Stars: ✭ 942 (+300.85%)
Mutual labels:  async, mysql
Websocket Client
Async WebSocket client for PHP based on Amp.
Stars: ✭ 83 (-64.68%)
Mutual labels:  async, amphp
Groupco
PHP的服务化框架。适用于Api、Http Server、Rpc Server;帮助原生PHP项目转向微服务化。出色的性能与支持高并发的协程相结合
Stars: ✭ 473 (+101.28%)
Mutual labels:  async, mysql
Process
An async process dispatcher for Amp.
Stars: ✭ 119 (-49.36%)
Mutual labels:  async, amphp
Madelineproto
Async PHP client/server API for the telegram MTProto protocol
Stars: ✭ 1,776 (+655.74%)
Mutual labels:  async, amphp
Mycat2
MySQL Proxy using Java NIO based on Sharding SQL,Calcite ,simple and fast
Stars: ✭ 750 (+219.15%)
Mutual labels:  async, mysql
Tortoise Orm
Familiar asyncio ORM for python, built with relations in mind
Stars: ✭ 2,558 (+988.51%)
Mutual labels:  async, mysql
Vertx Sql Client
High performance reactive SQL Client written in Java
Stars: ✭ 690 (+193.62%)
Mutual labels:  async, mysql
Postgres
Async Postgres client for PHP based on Amp.
Stars: ✭ 56 (-76.17%)
Mutual labels:  async, amphp
Http Client
Async HTTP/1.1+2 client for PHP based on Amp.
Stars: ✭ 553 (+135.32%)
Mutual labels:  async, amphp
Dns
Async DNS resolution for PHP based on Amp.
Stars: ✭ 82 (-65.11%)
Mutual labels:  async, amphp
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.
Stars: ✭ 5,039 (+2044.26%)
Mutual labels:  async, mysql
Antdata.orm
特色:vs插件或者t4一键生成entity 支持配置非物理外键。分离linq转sql引擎(原生linq非扩展)和执行dal功能,支持异步,支持netcore2.0
Stars: ✭ 428 (+82.13%)
Mutual labels:  async, mysql
Redis
Async Redis Client for PHP based on Amp.
Stars: ✭ 107 (-54.47%)
Mutual labels:  async, amphp
Zhttp
基于swoole的异步轻量级web框架,内部封装协程异步非阻塞全套mysql、redis、mongo、memcached连接池,可以轻松start、reload、stop,加入数据库的查询模块,框架已经封装好近乎同步写法,底层异步调用
Stars: ✭ 131 (-44.26%)
Mutual labels:  async, mysql

mysql

Build Status Code Coverage Release License

Async MySQL client built with Amp.


amp/mysql is an asynchronous MySQL client built on the Amp concurrency framework. The library exposes a Promise-based API to dynamically query multiple MySQL connections concurrently. The client transparently distributes these queries across a scalable pool of available connections and does so using 100% userland PHP; there are no external extension dependencies (e.g. ext/mysqli, ext/pdo, etc).

Features

  • Asynchronous API exposing full single-threaded concurrency
  • Transparent connection pooling to overcome MySQL's fundamentally synchronous connection protocol
  • MySQL transfer encoding support (gzip, TLS encryption)
  • Support for all MySQL commands

† As documented in official Mysql Internals Manual

Project Goals

  • Expose a non-blocking API for issuing multiple MySQL queries in parallel
  • Support the full MySQL protocol and all available commands asynchronously

Installation

This package can be installed as a Composer dependency.

composer require amphp/mysql

Requirements

Documentation & Examples

More extensive code examples reside in the examples directory.

Amp\Loop::run(function() {
    $config = Amp\Mysql\ConnectionConfig::fromString(
        "host=127.0.0.1 user=username password=password db=test"
    );
    
    /** @var \Amp\Mysql\Pool $pool */
    $pool = Amp\Mysql\pool($config);
    
    /** @var \Amp\Mysql\Statement $statement */
    $statement = yield $pool->prepare("SELECT * FROM table_name WHERE id = :id");
    
    /** @var \Amp\Mysql\ResultSet $result */
    $result = yield $statement->execute(['id' => 1337]);
    while (yield $result->advance()) {
        $row = $result->getCurrent();
        // $row is an associative array of column values. e.g.: $row['column_name']
    }
});

Versioning

amphp/mysql follows the semver semantic versioning specification like all other amphp packages.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].