1,234
edits
Changes
no edit summary
{{Admon/obsolete}}
<big><big> PostgreSQL Adapter for NexJ </big></big>
{{NexJ_Express Index}}
[[category: NexJ Past Projects]]
[[category: NexJ Express PostgreSQL]]
== Project Goal==
== Current Status==
* '''Completed''' (October 21, 2011)* Get the last PostgreSQL adapter source code from http://mercurial.nexj.com/express.cgi/core <!--{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
!align="left" style="background-color:SteelBlue; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"| Dec 2010
|-
* Application is now connected to the Postgre database.
|}
-->
==Project Phases==
=== Phase 1: Investigation (DONE) ===
* Get requirements from NexJ (Meeting on Friday Nov 5th)
* Walk-through the code
* Familiarization with PostgreSQL === Phase 2: Connect to PostgreSQL server (DONE) ===* [[NexJ_Express_Connecting_to_PostgreSQL| Connect to PostgreSQL server]] === Phase 3: PostgreSQLSchemaManager (DONE) ===* Estimated Duration: 3 weeks (Jan 17 - Feb 11, 2011)* [[PostgreSQL Adapter-nexj/extendingSchemaManager | Extending SQLSchemaManager ]]
=== Phase 24: Connect to PostgreSQLPostgreSQLAdapter (DONE)===* Estimated Duration: 3 weeks (Feb 14 - 25, 2011)* [[PostgreSQL_Adapter-nexj/test-env extendingSQLAdapter | Create Test EnvironmentExtending SQLAdapter ]]
=== Phase 35: Test first design PostgreSQL UnitTests and Optimization (DONE) ===* 1Estimated Duration: 2 weeks (Feb 28 - Create a PostgreSQL database through some scripts: Through the process in postgresql_setup.sqlMar 11, the database was created, initialized and tested:2016):: A * Add database called 'test is created in specific tests fostr PostgreSQL : <code> CREATE DATABASE test </code>*:: To create a <code>user</code> along with <code>password</code>: <code> CREATE USER test WITH PASSWORD 'test'; </code>for required contrib scripts*:: Login to the database 'test' with username 'test': <code> psql -U test test </code>for custom blob read & write functions:: Create a <code> Schema </code> called 'test' inside the database 'test' with particular owner 'test': <code> CREATE SCHEMA test AUTHORIZATION test;</code>:: Create a <code>table</code> called 'Mutex' with primary key: <code> CREATE TABLE test.Mutex(id INT PRIMARY KEY); </code>:: Insert a value into the primary key: <code> INSERT INTO test.Mutex(id) VALUES (1); </code>* Add PostgreSQL specific optimization
===Phase 6: Megre Code with Latest Revision (DONE) ===* 3- Working inside Schema 'test'Merge code with lastest revision from http://mercurial.nexj.com/express
===Phase 7: <code> CREATE TABLE test.xxx </code>:: data types are changed in <code> appendColumnTypeTest with NexJ Express Studio (DONE) </code> in ''PostgreSQLSchemaManager.java'' based on each jdbc type's equivalent in PostgreSQL. ===* Estimated duration:: The implementation Mar 7- Apr 14, 2011* Run model in <code> crateTextTable </code> in file ''PostgreSQLSchemaManager.java'' is removed Express studio using the postgresql adapter* create scripts for now (base class's version is being called).database initialization, creation and dumping: <code>CREATE INDEX test.xxx </code> * create scripts for JBoss: <code> CREATE Trigger test.xxx // if it's needed for PostgreSQL as well as MySQL</code>* Deploy to JBoss
=== Phase 8: Code Review 1 - Meeting (DONE) ===* ModificationsDate: Apr 20,2011 {|class* Meet with NexJ Developer to review code =="collapsible collapsed" style="borderPhase 9: Code Review 1 -styleApply Changes (DONE) ===* Estimated Duration:solid;borderApr 20, 2011 -width:thin;borderJuly 1, 2011* [[PostgreSQL_Adapter_Project_-color_Code_Review_1_Changes | Changes to be made]] === Phase 10:black"Code Review 2 (DONE) ===!align* Send code for review* =="left" style="background-colorPhase 11:SteelBlue; fontCode Review 2 -weightApply Changes (DONE) ===* Estimated Duration:bold;borderJuly 7, 2011 -style:solid;borderJuly 15, 2011* [[PostgreSQL_Adapter_Project_-width:thin;padding: 2px 2px 2px 2px;"_Code_Review_2_Changes | '''Changes Done to MySQL adapter''' be made]] === Phase 12: Code Review 3 (DONE) ===* Sent code for code review 3|* https://bitbucket.org/gbatumbya/postgresql_external/src/08cdedb9d071/ === Phase 13: Code Review 3 - Apply Changes (DONE) ===* Upgrade to lastest 7.1 branch|* Create Statement and PreparedStatementProxy* Create PostgreSQLPreparedStatementProxy: When a connection is first established, ** implement set/getQueryTimeout** move custom timeout code into this initial SQL statement should execute proxy* Override prepareStatement in MySQL, which is not PostgreSQL to return PostgreSQLPreparedStatementProxy* Implement implicit save points for statements within a transaction block* Modify readSchema to use addColumn for reading columns from the case database** Remove MSSQL and Oracle specific code from addColumn** Override addColumn in PostgreSQL for PostgreSQLtext, so it was commented outbytea and lo types === Phase 14:Integration Tests (DONE) ===* Run Integration tests against the Adapter === Phase 15::Code Review 4 (DONE)===<source lang=java>* Code review with framework architect* https://* MySQLAdapterbitbucket.java *org/gbatumbya/postgresql_external/src/6c9a7380c8fe
=== Phase 19: Code Review 6 ===
* Date: Oct 13
* Submitted for code review
* https://bitbucket.org/gbatumbya/postgresql_external/src/153aec847d54/
== Project Repository ==* Add test cases that are specific to PostgreSQL databaseURL for central repository of the project is: https://bitbucket.org/gbatumbya/nexjexpress-postgresqladapter
== Resources ==
* Downloads
Linux binaries http://www.openscg.org/se/postgresql/packages.jsp
* Debugging
:[[Run_Junit_Tests_For_Non_Default_SQL_Adapter | Unit Testing for non Default SQL Adapter]]
:
* Intro
:Concept of Adapter [http://www.vogella.de/articles/DesignPatternAdapter/article.html]
* [[PostgreSQL_Adapter-nexj/Resources#MySQL_Specifications | MySQL Specifications]]
* [[PostgreSQL_Adapter-nexj/Resources#PostgreSQL_-_MySQL_Compare | Postgre - MySQL Compare]]
== Summary of Applied Research ==
* [[Research Findings - PostgreSQLAdapter]]
* [[Research Notes - PostgreSQLAdapter]]