Difference between revisions of "NexJ Express Connecting to PostgreSQL"
Line 2: | Line 2: | ||
{{NexJ_Express Index}} | {{NexJ_Express Index}} | ||
− | == Install PostgreSQL == | + | == TODO == |
+ | {|class="wikitable" | ||
+ | |- | ||
+ | ! Task | ||
+ | ! Status | ||
+ | |- | ||
+ | | Install the PostgreSQL Server | ||
+ | | DONE | ||
+ | |- | ||
+ | | Install PostgreSQL driver | ||
+ | | DONE | ||
+ | |- | ||
+ | | Add code to connect to server | ||
+ | | DONE | ||
+ | |- | ||
+ | | Test connection to the server | ||
+ | | DONE | ||
+ | |- | ||
+ | | Configure UnitTests for multiple DB's | ||
+ | | | ||
+ | |} | ||
+ | * Install the PostgreSQL Server.<br/> | ||
+ | * Configure a Test database.<br/> | ||
+ | * Create and test connection to the server.<br/> | ||
+ | |||
+ | === Install PostgreSQL === | ||
Download: <code> Installer version Version 9.0.1-1</code> from list of [http://www.enterprisedb.com/products/pgdownload.do#windows PostgreSQL downloads]. | Download: <code> Installer version Version 9.0.1-1</code> from list of [http://www.enterprisedb.com/products/pgdownload.do#windows PostgreSQL downloads]. | ||
− | == Install PostgreSQL JDBC3 driver == | + | === Install PostgreSQL JDBC3 driver === |
Download: <code> JDBC3 Postgresql Driver, Version 9.0-801 </code> @ http://jdbc.postgresql.org/download.html | Download: <code> JDBC3 Postgresql Driver, Version 9.0-801 </code> @ http://jdbc.postgresql.org/download.html | ||
<br/>Install: Copy driver to <code>[jdk folder]/jre/lib/ext</code> | <br/>Install: Copy driver to <code>[jdk folder]/jre/lib/ext</code> | ||
− | == Code: Add PostgreSQL Driver == | + | === Code: Add PostgreSQL Driver === |
Package: <code>nexj.core.persistance.sql</code> | Package: <code>nexj.core.persistance.sql</code> | ||
::Create <code>PostgreSQLAdapter.java</code> by extending <code>SQLAdapter</code> | ::Create <code>PostgreSQLAdapter.java</code> by extending <code>SQLAdapter</code> | ||
Line 21: | Line 46: | ||
::Edit <code>system.dstypes</code> | ::Edit <code>system.dstypes</code> | ||
− | == UnitTest: Test Connectivity to database == | + | === UnitTest: Test Connectivity to database === |
Package: <code>nexj.core.persistance.sql</code> | Package: <code>nexj.core.persistance.sql</code> | ||
::Create <code>PostgreSQLAdapterTest.java</code> by extending <code>SQLAdapterTest</code> | ::Create <code>PostgreSQLAdapterTest.java</code> by extending <code>SQLAdapterTest</code> |
Revision as of 12:33, 11 January 2011
PostgreSQL Adapter for NexJ - Connect to PostgreSQL database
Contents
TODO
Task | Status |
---|---|
Install the PostgreSQL Server | DONE |
Install PostgreSQL driver | DONE |
Add code to connect to server | DONE |
Test connection to the server | DONE |
Configure UnitTests for multiple DB's |
- Install the PostgreSQL Server.
- Configure a Test database.
- Create and test connection to the server.
Install PostgreSQL
Download: Installer version Version 9.0.1-1
from list of PostgreSQL downloads.
Install PostgreSQL JDBC3 driver
Download: JDBC3 Postgresql Driver, Version 9.0-801
@ http://jdbc.postgresql.org/download.html
Install: Copy driver to [jdk folder]/jre/lib/ext
Code: Add PostgreSQL Driver
Package: nexj.core.persistance.sql
- Create
PostgreSQLAdapter.java
by extendingSQLAdapter
- Create
PostgreSQLSchemaManager.java
by extendingSQLSchemaManager
- Create
- Edit
RelationalDatabase.java
- Edit
RelationalDatabaseFragment.java
- Edit
SQLSchemaManagerFactory.java
- Edit
Package: nexj.core.meta.sys
- Edit
system.dstypes
- Edit
UnitTest: Test Connectivity to database
Package: nexj.core.persistance.sql
- Create
PostgreSQLAdapterTest.java
by extendingSQLAdapterTest
- Create
PostgreSQLSchemaManagerTest.java
by extendingSQLSchemaManagerTest
- Create
Package: nexj
- Create
postgresql.connections
using NexJ Studio - Edit
default.config
to use PostgreSQL - Edit all
*.connections
files to use PostgreSQL
- Create
TODO: find out how to configure UnitTests for more than one Database