Skip to content
New issue

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

Custom index definitions #3

Open
Tim020 opened this issue Mar 23, 2024 · 0 comments
Open

Custom index definitions #3

Tim020 opened this issue Mar 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Tim020
Copy link
Owner

Tim020 commented Mar 23, 2024

Allow custom indexes to be specified to be created by Couch Potato, for example:

class UserModel(couch_potato.Model):
    __bucket__ = "test"
    __key_generator__ = KeyGenerator("User::{name}")

    name = String()
    age = Integer()

    indexes = [Index("my_index", name, age), Index("my_index_2", age)]
@Tim020 Tim020 added the enhancement New feature or request label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant