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

Server::getDatabase() #13

Open
sminnee opened this issue Dec 1, 2016 · 0 comments
Open

Server::getDatabase() #13

sminnee opened this issue Dec 1, 2016 · 0 comments

Comments

@sminnee
Copy link
Member

sminnee commented Dec 1, 2016

Sometimes once you have create a server you also want to connect to the database powering it.

Ideally, there would be an method on Server that would provide details of how to access the database powering the site.

The specific use-case I have in mind is when an integration test has started a test server, and wants access to the database in order to manipulate the database content of fixtures.

Perhaps this can return a SilverStripe Database object, rather than inventing a new scheme for this.

In the case of companion project such as https://github.com/sminnee/docker-serve/, this getDatabase() method could be overridden to provide details of how to access the container's database.

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

No branches or pull requests

2 participants