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

Auto check and create job table #5

Open
kritzware opened this issue Sep 5, 2018 · 2 comments
Open

Auto check and create job table #5

kritzware opened this issue Sep 5, 2018 · 2 comments
Labels

Comments

@kritzware
Copy link
Contributor

kritzware commented Sep 5, 2018

Instead of making the user call the method createTable(), the library could check if the table exists once connected and then call this function internally if not.

await ox.createTable()
@kritzware kritzware added the idea label Sep 5, 2018
@avermeil
Copy link
Member

avermeil commented Sep 6, 2018

That's interesting... is there much of a cost to calling

CREATE TABLE IF NOT EXISTS oxen_queue

for every instance of Oxen?

@gaurav8298
Copy link

gaurav8298 commented Mar 6, 2023

No, I don't see anything wrong with create table if not exist, rather this is a safe and good programming.
About auto checking, Yes, it will be a good thing to do that.

Also, it would be nice if, we can pass a connection to the new Oxen() constructor. Most of the time, projects that would be using this library would already have a connection setup to the MySQL DB, so it's will be quite nice and effective if the same connection could be reused rather than creating a new connection to the DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants