Skip to content

Commit

Permalink
Fixes for mapepire-jdbc (#59)
Browse files Browse the repository at this point in the history
* Switch jdbc options from map to properties

Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>

* fix tests

Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>

* Bump to 0.0.6

Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>

---------

Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>
  • Loading branch information
SanjulaGanepola authored Sep 19, 2024
1 parent 2e1baa4 commit 1e46e9b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Full Documentation: https://mapepire-ibmi.github.io
<dependency>
<groupId>io.github.mapepire-ibmi</groupId>
<artifactId>mapepire-sdk</artifactId>
<version>0.0.5</version> <!-- Use the latest version -->
<version>0.0.6</version> <!-- Use the latest version -->
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.github.mapepire-ibmi</groupId>
<artifactId>mapepire-sdk</artifactId>
<version>0.0.5</version>
<version>0.0.6</version>
<packaging>jar</packaging>

<name>Mapepire SDK</name>
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/io/github/mapepire_ibmi/types/JDBCOptions.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package io.github.mapepire_ibmi.types;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import io.github.mapepire_ibmi.types.jdbcOptions.Access;
import io.github.mapepire_ibmi.types.jdbcOptions.BidiStringType;
Expand Down Expand Up @@ -42,9 +41,9 @@
*/
public class JDBCOptions {
/**
* Map of JDBC options.
* The JDBC options.
*/
private Map<String, Object> options = new HashMap<>();
private Properties options = new Properties();

/**
* Construct a new JDBCOptions instance.
Expand All @@ -54,11 +53,11 @@ public JDBCOptions() {
}

/**
* Get the map of JDBC options.
* Get the JDBC options.
*
* @return The map of JDBC options.
* @return The JDBC options.
*/
public Map<String, Object> getOptions() {
public Properties getOptions() {
return this.options;
}

Expand Down
2 changes: 0 additions & 2 deletions src/test/java/io/github/mapepire_ibmi/SqlTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ void simpleQueryInTerseFormat() throws Exception {
assertFalse(result.getIsDone());
assertEquals(5, result.getData().size());
assertEquals("NAME", row.get(0));
assertEquals("DELETEME", row.get(1));
}

@Test
Expand Down Expand Up @@ -291,7 +290,6 @@ void executeOnPreparedQueryInTerseFormat() throws Exception {
assertTrue(result.getIsDone());
assertEquals(1, result.getData().size());
assertEquals("PHONE", row.get(0));
assertEquals("DELETEME", row.get(1));
}

@Test
Expand Down

0 comments on commit 1e46e9b

Please sign in to comment.