Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit 14df1d9

Browse files
Init
1 parent fd432f9 commit 14df1d9

15 files changed

+2049
-18
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ You should have the following things installed:
3333
* Ensure that everything is encoded in ``UTF-8``
3434
* Ensure that the JDK/Java-Version is correct
3535

36-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/xdev-swing-framework-template/release.yml?branch=master)](https://github.com/xdev-software/xdev-swing-framework-template/actions/workflows/release.yml)
36+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/xapi-db-ingres/release.yml?branch=master)](https://github.com/xdev-software/xapi-db-ingres/actions/workflows/release.yml)
3737

3838
Before releasing:
39-
* Consider doing a [test-deployment](https://github.com/xdev-software/xdev-swing-framework-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
39+
* Consider doing a [test-deployment](https://github.com/xdev-software/xapi-db-ingres/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4040
* Check the [changelog](CHANGELOG.md)
4141

4242
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes.

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/com.xdev-software/xdev-swing-framework-template)](https://mvnrepository.com/artifact/com.xdev-software/xdev-swing-framework-template)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/xdev-swing-framework-template/checkBuild.yml?branch=develop)](https://github.com/xdev-software/xdev-swing-framework-template/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
3-
[![javadoc](https://javadoc.io/badge2/com.xdev-software/xdev-swing-framework-template/javadoc.svg)](https://javadoc.io/doc/com.xdev-software/xdev-swing-framework-template)
4-
# xdev-swing-framework-template
1+
[![Latest version](https://img.shields.io/maven-central/v/com.xdev-software/xapi-db-ingres)](https://mvnrepository.com/artifact/com.xdev-software/xapi-db-ingres)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/xapi-db-ingres/checkBuild.yml?branch=develop)](https://github.com/xdev-software/xapi-db-ingres/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
3+
[![javadoc](https://javadoc.io/badge2/com.xdev-software/xapi-db-ingres/javadoc.svg)](https://javadoc.io/doc/com.xdev-software/xapi-db-ingres)
4+
# SqlEngine Database Adapter Ingres
55

6-
A XDEV Swing Framework Template
6+
The XDEV Application Framework provides an abstraction over database dialects as part of its SqlEngine. This module is the Database Adapter for Ingres which includes the Ingres-specific implementation for database access.
7+
8+
## Important Note
9+
10+
We once wrote this Database Adapter for Ingres 4.0.7. Apperently, the oldest version of this driver for maven is 9.1-3.2.4 (https://mvnrepository.com/artifact/com.ingres.jdbc/iijdbc/9.1-3.2.4). But this is not compatible with our code.
11+
You therefore, have to integrate your own 4.0.7 driver manualy without maven.
12+
13+
Furthermore, this Adapter is not able to write to the Database. Only reading is available. <br>
14+
The Following actions are not supported:
15+
- createTable
16+
- addColumn
17+
- alterColumn
18+
- dropColumn
19+
- createIndex
20+
- dropIndex
21+
- appendEscapeName
722

823
## XDEV-IDE
924
The [XDEV(-IDE)](https://xdev.software/en/products/swing-builder) is a visual Java development environment for fast and easy application development (RAD - Rapid Application Development). XDEV differs from other Java IDEs such as Eclipse or NetBeans, focusing on programming through a far-reaching RAD concept. The IDE's main components are a Swing GUI builder, the XDEV Application Framework and numerous drag-and-drop tools and wizards with which the functions of the framework can be integrated.
@@ -17,4 +32,4 @@ If you need support as soon as possible and you can't wait for any pull request,
1732
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1833

1934
## Dependencies and Licenses
20-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/xdev-swing-framework-template/dependencies/)
35+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/xapi-db-ingres/dependencies/)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/xdev-swing-framework-template/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/xapi-db-ingres/security/advisories/new).

pom.xml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>com.xdev-software</groupId>
8-
<artifactId>xdev-swing-framework-template</artifactId>
8+
<artifactId>xapi-db-ingres</artifactId>
99
<version>1.0.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

12-
<name>xdev-swing-framework-template</name>
13-
<description>xdev-swing-framework-template</description>
14-
<url>https://github.com/xdev-software/xdev-swing-framework-template</url>
12+
<name>SqlEngine Database Adapter Ingres</name>
13+
<description>XAPI SqlEngine Database Adapter for Ingres</description>
14+
<url>https://github.com/xdev-software/xapi-db-ingres</url>
1515

1616
<scm>
17-
<url>https://github.com/xdev-software/xdev-swing-framework-template</url>
18-
<connection>https://github.com/xdev-software/xdev-swing-framework-template.git</connection>
19-
</scm>
17+
<url>https://github.com/xdev-software/xapi-db-ingres</url>
18+
<connection>https://github.com/xdev-software/xapi-db-ingres.git</connection>
19+
</scm>
2020

21-
<inceptionYear>2023</inceptionYear>
21+
<inceptionYear>2003</inceptionYear>
2222

2323
<organization>
2424
<name>XDEV Software</name>
@@ -48,6 +48,8 @@
4848

4949
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5050
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
51+
52+
<xdev.xapi.version>6.0.1</xdev.xapi.version>
5153
</properties>
5254

5355
<repositories>
@@ -87,7 +89,11 @@
8789
</distributionManagement>
8890

8991
<dependencies>
90-
92+
<dependency>
93+
<groupId>com.xdev-software</groupId>
94+
<artifactId>xapi</artifactId>
95+
<version>${xdev.xapi.version}</version>
96+
</dependency>
9197
</dependencies>
9298

9399
<build>

src/main/java/ingres.png

231 Bytes
Loading
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/*
2+
* SqlEngine Database Adapter Ingres - XAPI SqlEngine Database Adapter for Ingres
3+
* Copyright © 2003 XDEV Software (https://xdev.software)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Lesser General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
package xdev.db.ingres.jdbc;
19+
20+
21+
22+
23+
import com.xdev.jadoth.sqlengine.dbms.DbmsConnectionInformation;
24+
import xdev.db.ConnectionInformation;
25+
26+
27+
public class IngresConnectionInformation extends ConnectionInformation<IngresDbms>
28+
{
29+
// /////////////////////////////////////////////////////////////////////////
30+
// constructors //
31+
// ///////////////////
32+
33+
public IngresConnectionInformation(final String host, final int port, final String user,
34+
final String password, final String database, final String urlExtension,
35+
final IngresDbms dbmsAdaptor)
36+
{
37+
super(host,port,user,password,database,urlExtension,dbmsAdaptor);
38+
}
39+
40+
41+
// /////////////////////////////////////////////////////////////////////////
42+
// getters //
43+
// ///////////////////
44+
45+
/**
46+
* Gets the database.
47+
*
48+
* @return the database
49+
*/
50+
public String getDatabase()
51+
{
52+
return this.getCatalog();
53+
}
54+
55+
56+
// /////////////////////////////////////////////////////////////////////////
57+
// setters //
58+
// ///////////////////
59+
60+
/**
61+
* Sets the database.
62+
*
63+
* @param database
64+
* the database to set
65+
*/
66+
public void setDatabase(final String database)
67+
{
68+
setCatalog(database);
69+
}
70+
71+
72+
// /////////////////////////////////////////////////////////////////////////
73+
// override methods //
74+
// ///////////////////
75+
76+
/**
77+
* @see DbmsConnectionInformation#createJdbcConnectionUrl()
78+
*/
79+
@Override
80+
public String createJdbcConnectionUrl()
81+
{
82+
String user = getUser();
83+
String pwd = getPassword();
84+
String url;
85+
if((user == null || user.length() == 0) && (pwd == null || pwd.length() == 0))
86+
{
87+
url = "jdbc:ingres://" + getHost() + ":" + getPort() + "/" + getCatalog();
88+
}
89+
else
90+
{
91+
url = "jdbc:ingres://" + getHost() + ":" + getPort() + "/" + getCatalog() + ";UID="
92+
+ user + ";PWD=" + pwd;
93+
}
94+
return appendUrlExtension(url);
95+
}
96+
97+
98+
/**
99+
* @return
100+
* @see DbmsConnectionInformation#getJdbcDriverClassName()
101+
*/
102+
@Override
103+
public String getJdbcDriverClassName()
104+
{
105+
return "com.ingres.jdbc.IngresDriver";
106+
}
107+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* SqlEngine Database Adapter Ingres - XAPI SqlEngine Database Adapter for Ingres
3+
* Copyright © 2003 XDEV Software (https://xdev.software)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Lesser General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
package xdev.db.ingres.jdbc;
19+
20+
21+
22+
23+
import com.xdev.jadoth.sqlengine.dbms.standard.StandardDDLMapper;
24+
25+
26+
public class IngresDDLMapper extends StandardDDLMapper<IngresDbms>
27+
{
28+
29+
public IngresDDLMapper(IngresDbms dbmsAdaptor)
30+
{
31+
super(dbmsAdaptor);
32+
}
33+
34+
}

0 commit comments

Comments
 (0)