You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user_id use Snowflake id,such as 79535114761158382
md5(user_id)
get first one letter for schema name, then join wkread_users_, such as wkread_users_a
every database host has two schema, such as wkread_users_2,wkread_users_3in the db06 host
first two letters for table name, then join user_, such as tables user_30,user_31``user_32``user_33``user_34``user_35``user_36``user_37``user_38``user_39``user_3a``user_3b``user_3c``user_3d``user_3e``user_3f in the schema wkread_users_3
Your Question
sharding rules as follows
user_id use Snowflake id,such as
79535114761158382
md5(user_id)
get first one letter for schema name, then join
wkread_users_
, such aswkread_users_a
every database host has two schema, such as
wkread_users_2
,wkread_users_3
in thedb06
hostfirst two letters for table name, then join
user_
, such as tablesuser_30
,user_31``user_32``user_33``user_34``user_35``user_36``user_37``user_38``user_39``user_3a``user_3b``user_3c``user_3d``user_3e``user_3f
in the schemawkread_users_3
Sharding is as follows in my project
database conf
database dialector is mysql
query a user by uid code as follows
get an error when run
The document you expected this should be explained
Can not
db.Use
used whendb.Clauses
is used ?cannot use Clauses
Expected answer
get a user as expected. or how to do as described ?
The text was updated successfully, but these errors were encountered: