Skip to content
jordanell edited this page Jul 3, 2012 · 2 revisions

In order to use the database project, it is recommended that it be built using the supplies Eclipse ant script and referenced through the libs which should be checked out in a sibling directory to your current project.

Connecting

First, verify that the connection information inside of the db/Resources.java class are correct. Specifically, your username, password and server. Eggnet simply port forwarded our localhost connection to which ever server we needed instead of changing the internal code.

After the above has been varified, you can connect to the database through:
YourDB db = new YourDB(); db.connect("dbname");
Where YourDB is a custom class which extends the ConnectionDb class and dbname is the name of the database you wish to connect to on the server.

Setting Branch

Eggnet's suite of project relies heavily on this database schema which relies on supplying a branch name for operations. So, to set the branch name you wish to work on, simply write:
db.setBranchName("branch")
Where branch is the name of the branch you wish to work on. Most of the time, this is simply "master".

Usage

After the above steps are preformed you can use any of the supplied functions or write your own inside of your extending class (YourDB).

Clone this wiki locally