sharding (core): Add base sharding support.
Add `meta.args` for command line argument access. Add command line argument support for shard number. Add shard count to config file. Add `meta.sharding` exposing shard properties. Add shard number to logging methods. Add shard number to data appid.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from .connection import _replace_char
|
||||
|
||||
from meta import sharding
|
||||
|
||||
|
||||
class Condition:
|
||||
"""
|
||||
@@ -82,5 +84,8 @@ class SHARDID(Condition):
|
||||
values.append(self.shardid)
|
||||
|
||||
|
||||
THIS_SHARD = SHARDID(sharding.shard_number, sharding.shard_count)
|
||||
|
||||
|
||||
NULL = Constant('IS NULL')
|
||||
NOTNULL = Constant('IS NOT NULL')
|
||||
|
||||
Reference in New Issue
Block a user