-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
136 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
 | ||
[logo]: https://www.dropbox.com/s/fip95qrdcg0yhm5/small-logo.png?dl=1 "Logo" | ||
|
||
[](https://travis-ci.org/frazboyz/Active-ORM) | ||
|
||
ActiveORM is a java active record implementation which support SQLite, Postgresql and MySQL. | ||
ActiveORM, it is a object relational mapping which follows the active record pattern. | ||
|
||
It supports the major databases(SQLite, PostgreSQL, MySQL and H2). | ||
It also provides a query module so you can easily query for objects in an object orientated manner. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connector: h2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.activeorm.database; | ||
|
||
import org.activeorm.database.configuration.H2DatabaseConfiguration; | ||
import org.activeorm.database.sql.DefaultSQLProducer; | ||
|
||
import java.sql.Connection; | ||
import java.sql.DriverManager; | ||
import java.sql.SQLException; | ||
|
||
/** | ||
* Created by Francis on 7/05/16. | ||
* Project Active-ORM. | ||
* | ||
* A H2Database {@link Database} implementation. | ||
*/ | ||
public class H2Database extends Database { | ||
|
||
/** | ||
* Constructs a new {@link H2Database}. | ||
*/ | ||
public H2Database() { | ||
super(new H2DatabaseConfiguration(), new DefaultSQLProducer()); | ||
} | ||
|
||
public Connection connect() { | ||
try { | ||
// Load the HSQLDB driver class | ||
Class.forName("org.h2.Driver"); | ||
connection = DriverManager.getConnection("jdbc:h2:mem:database", "sa", ""); | ||
} catch (SQLException | ClassNotFoundException e) { | ||
e.printStackTrace(); | ||
} | ||
return connection; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/org/activeorm/database/configuration/H2DatabaseConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.activeorm.database.configuration; | ||
|
||
/** | ||
* Created by Francis on 7/05/16. | ||
* Project Active-ORM. | ||
* | ||
* A H2Database {@link DatabaseConfiguration} implementation. | ||
*/ | ||
public class H2DatabaseConfiguration extends DatabaseConfiguration { | ||
|
||
/** | ||
* Constructs a new {@link H2DatabaseConfiguration}. | ||
*/ | ||
public H2DatabaseConfiguration() { | ||
super(null, null, null, null); | ||
} | ||
|
||
} |
22 changes: 0 additions & 22 deletions
22
src/org/activeorm/database/configuration/PostgreSQLDatabaseConfiguration.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters