We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've Seen this video NoSQL Data Modeling with Redis: Building 1-to-Many Relationships , he inherits the base and sets the model key prefix.But he never shows the base code i have no idea how he does it.
###This is with what i cam up
def Base(model_prefix): class BaseModel(): class Meta: global_key_prefix = RPU_REDIS_DATA_PREFIX model_key_prefix = model_prefix database = get_redis_connection(host=RPU_REDIS_DATA_HOST,port=RPU_REDIS_DATA_PORT,db=RPU_REDIS_DATA_DB,decode_responses=True) return BaseModel class User(Base("User"),JsonModel): My_Id : Optional[str] = Field(primary_key=True,index=True,default=str(ULID())) username: str = Field(index=True) name: str lastname: str
I don't know is this right how to write the BASE and if it creates a connection for every model this will be bad ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I've Seen this video NoSQL Data Modeling with Redis: Building 1-to-Many Relationships , he inherits the base and sets the model key prefix.But he never shows the base code i have no idea how he does it.
###This is with what i cam up
I don't know is this right how to write the BASE and if it creates a connection for every model this will be bad ?
The text was updated successfully, but these errors were encountered: