Difference between revisions of "NexJ Express Connecting to PostgreSQL"

From CDOT Wiki
Jump to: navigation, search
Line 2: Line 2:
 
{{NexJ_Express Index}}
 
{{NexJ_Express Index}}
  
== TODO ==
+
== Task Summary ==
{|
+
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
 
|-
 
|-
 
! Task
 
! Task
Line 23: Line 23:
 
|  
 
|  
 
|}
 
|}
* Install the PostgreSQL Server.<br/>
 
* Configure a Test database.<br/>
 
* Create and test connection to the server.<br/>
 
  
 +
== Task Details ==
 
=== Install PostgreSQL ===
 
=== 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].
Line 56: Line 54:
 
::Edit all <code>*.connections</code> files to use PostgreSQL
 
::Edit all <code>*.connections</code> files to use PostgreSQL
  
'''TODO: find out how to configure UnitTests for more than one Database'''
+
===Configure UnitTests for more than one Database===
  
 
<!--
 
<!--

Revision as of 12:44, 11 January 2011

PostgreSQL Adapter for NexJ - Connect to PostgreSQL database

Task Summary

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

Task Details

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 extending SQLAdapter
Create PostgreSQLSchemaManager.java by extending SQLSchemaManager
Edit RelationalDatabase.java
Edit RelationalDatabaseFragment.java
Edit SQLSchemaManagerFactory.java

Package: nexj.core.meta.sys

Edit system.dstypes

UnitTest: Test Connectivity to database

Package: nexj.core.persistance.sql

Create PostgreSQLAdapterTest.java by extending SQLAdapterTest
Create PostgreSQLSchemaManagerTest.java by extending SQLSchemaManagerTest

Package: nexj

Create postgresql.connections using NexJ Studio
Edit default.config to use PostgreSQL
Edit all *.connections files to use PostgreSQL

Configure UnitTests for more than one Database