Skip to content

switon-php/sharding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Switon Sharding Package

Database sharding and shard resolution for Switon Framework.

Installation

composer require switon/sharding

Requirements: PHP 8.3+

Quick Start

use Switon\Orm\Attribute\Connection;
use Switon\Orm\Attribute\Table;
use Switon\Orm\Entity;

#[Connection('db:user_id%4')]  // db_0 ... db_3
#[Table('user:user_id%8')]     // user_0 ... user_7
class User extends Entity
{
    public int $user_id;
    public string $name;
}

Docs: https://docs.switon.dev/latest/sharding

License

MIT.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages