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

DAO for plugins developers #312

Closed
thibaultcha opened this issue Jun 8, 2015 · 1 comment
Closed

DAO for plugins developers #312

thibaultcha opened this issue Jun 8, 2015 · 1 comment
Assignees
Milestone

Comments

@thibaultcha
Copy link
Member

Like the way we allow developers to easily extend the Admin API, we need a way to allow them to easily extend the DAO, so they can interact with their plugin's tables.

Right now DAOs are implemented OOP-style, which is not very intuitive and need to have written queries. I am not sure about hiding the queries in this implementation tho. More to come later about this.

@thibaultcha thibaultcha added the dao label Jun 8, 2015
@thibaultcha thibaultcha added this to the 0.4.0 milestone Jun 8, 2015
@thibaultcha thibaultcha self-assigned this Jun 9, 2015
@thibaultcha thibaultcha changed the title DAO for plugin developers DAO for plugins developers Jun 9, 2015
@subnetmarco
Copy link
Member

IMHO it would be nice to have a DAO implementation that can auto-generate operations for the standard CRUD operations, especially if we plan to use multiple DAOs. Something like (pseudo-code):

local dao_crud = dao.dao_crud -- The right dao_crud is set by the dao_factory
dao_crud:insert("sometable", schema, value)
dao_crud:find_one("sometable", schema, query)

We would then need one implementation of dao_crud per datastore, and any new datastore we might introduce won't affect the plugins with the exception of rate-limiting which has a specific increment method that is deeply integrated with the underlying datastore and needs to be specifically implemented for each datastore.

We can also wait until we really have another DAO to see what we really need.

hutchic added a commit that referenced this issue Jun 10, 2022
Update dependency stevedore to v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants