Skip to content

Commit 8e10cac

Browse files
committed
docs: enhance readme
Signed-off-by: Otavio Santana <[email protected]>
1 parent 8a78626 commit 8e10cac

File tree

1 file changed

+41
-76
lines changed

1 file changed

+41
-76
lines changed

README.adoc

Lines changed: 41 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,11 +1058,9 @@ Stream<Person> stream = template.select(Person.class , filter);
10581058

10591059
image::https://www.jnosql.org/img/logos/oracle.png[Oracle NoSQL Project,align="center"width=25%,height=25%]
10601060

1061-
https://www.arangodb.com/[ArangoDB] is a native multi-model database with flexible data models for documents, graphs, and key-values.
1062-
Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
1063-
1064-
This API offers support for **Document** and **Key-Value** types.
1061+
https://www.oracle.com/database/nosql/technologies/nosql/[Oracle NoSQL Database] is a native multi-model database that provides flexible data models for documents, graphs, and key values. You can develop high-performance applications using a user-friendly SQL-like query language or JavaScript extensions.
10651062

1063+
This API offers support for *Document* and *Key-Value* data types.
10661064

10671065
=== How To Install
10681066

@@ -1079,60 +1077,56 @@ You can use either the Maven or Gradle dependencies:
10791077

10801078
=== Configuration
10811079

1082-
This API provides the ```ArangoDBConfigurations``` class to programmatically establish the credentials.
1080+
This API provides the ```OracleNoSQLConfigurations``` class to programmatically establish the credentials.
10831081
Please note that you can establish properties using the https://microprofile.io/microprofile-config/[MicroProfile Config] specification.
10841082

1085-
[cols="Arango Properties"]
1083+
[cols="Oracle NoSQL Properties"]
10861084
|===
1087-
|Configuration property |Description
1085+
| Property Name | Description
10881086

1089-
|`jnosql.jnosql.arangodb.host`
1090-
|The database host, where you need to put the port split by colons. E.g.: jnosql.jnosql.arangodb.host=localhost:8529
1087+
| `jnosql.oracle.nosql.host` | Specifies the hostname or IP address of the Oracle NoSQL database server.
10911088

1092-
|`jnosql.arangodb.user`
1093-
|The user's userID.
1089+
| `jnosql.oracle.nosql.user` | Specifies the username used to authenticate with the Oracle NoSQL database.
10941090

1095-
|`jnosql.arangodb.password`
1096-
|The user's password
1091+
| `jnosql.oracle.nosql.password` | Specifies the password used to authenticate with the Oracle NoSQL database.
10971092

1098-
|`jnosql.arangodb.timeout`
1099-
|The connection and request timeout in milliseconds.
1093+
| `jnosql.oracle.nosql.table.read.limit` | Specifies the desired throughput of read operations when creating a table using Eclipse JNoSQL.
11001094

1101-
|`jnosql.arangodb.chunk.size`
1102-
|The chunk size when Protocol is used.
1095+
| `jnosql.oracle.nosql.table.write.limit` | Specifies the desired throughput of write operations when creating a table using Eclipse JNoSQL.
11031096

1104-
|`jnosql.arangodb.userSsl`
1105-
|The true SSL will be used when connecting to an ArangoDB server.
1097+
| `jnosql.oracle.nosql.table.storage.gb` | Specifies the maximum storage, in gigabytes, to be consumed by a table created using Eclipse JNoSQL.
11061098

1107-
|`jnosql.arangodb.load.balancing.strategy`
1108-
|The com.arangodb.entity.LoadBalancingStrategy as String.
1099+
| `jnosql.oracle.nosql.table.wait.millis` | Specifies the total amount of time to wait, in milliseconds, when creating a table.
11091100

1110-
|`jnosql.arangodb.protocol`
1111-
|The com.arangodb.Protocol as String
1101+
| `jnosql.oracle.nosql.table.delay.millis` | Specifies the amount of time to wait, in milliseconds, between polling attempts when creating a table.
11121102

1113-
|`jnosql.arangodb.connections.max`
1114-
|The maximum number of connections the built-in connection pool will open per host.
1103+
| `jnosql.oracle.nosql.deployment` | Specifies the deployment type for Oracle NoSQL database.
11151104

1116-
|`jnosql.arangodb.acquire.host.list`
1117-
|Set hosts split by comma
1105+
| `jnosql.oracle.nosql.tenant.id` | Specifies the Oracle NoSQL database tenant ID for Cloud deployment.
1106+
1107+
| `jnosql.oracle.nosql.fingerprint` | Specifies the fingerprint for authentication with Oracle NoSQL database for Cloud deployment.
1108+
1109+
| `jnosql.oracle.nosql.private.key` | Specifies the private key for authentication with Oracle NoSQL database for Cloud deployment.
11181110
|===
11191111

1120-
This is an example using ArangoDB's Document API with MicroProfile Config.
1112+
1113+
1114+
This is an example using Oracle NoSQL's Document API with MicroProfile Config.
11211115

11221116
[source,properties]
11231117
----
1124-
jnosql.document.provider=org.eclipse.jnosql.databases.arangodb.communication.ArangoDBDocumentConfiguration
1125-
jnosql.document.database=<DATABASE>
1126-
jnosql.arangodb.host=localhost:8529
1118+
jnosql.document.provider=org.eclipse.jnosql.databases.oracle.communication.OracleDocumentConfiguration
1119+
jnosql.document.database=library
1120+
jnosql.oracle.nosql.host=http://localhost:8080
11271121
----
11281122

1129-
This is an example using ArangoDB's Key-Value API with MicroProfile Config.
1123+
This is an example using Oracle NoSQL's Key-Value API with MicroProfile Config.
11301124

11311125
[source,properties]
11321126
----
1133-
jnosql.keyvalue.provider=org.eclipse.jnosql.databases.arangodb.communication.ArangoDBKeyValueConfiguration
1134-
jnosql.keyvalue.database=<DATABASE>
1135-
jnosql.arangodb.host=localhost:8529
1127+
jnosql.keyvalue.provider=org.eclipse.jnosql.databases.oracle.communication.OracleNoSQLKeyValueConfiguration
1128+
jnosql.keyvalue.database=library
1129+
jnosql.oracle.nosql.host=http://localhost:8080
11361130
----
11371131

11381132
The config settings are the default behavior; nevertheless, there is an option to do it programmatically. Create a class that implements the `Supplier<ArangoDBDocumentManager>` and then defines it as an `@Alternative` and the `Priority`.
@@ -1142,13 +1136,13 @@ The config settings are the default behavior; nevertheless, there is an option t
11421136
@ApplicationScoped
11431137
@Alternative
11441138
@Priority(Interceptor.Priority.APPLICATION)
1145-
public class ManagerSupplier implements Supplier<ArangoDBDocumentManager> {
1139+
public class ManagerSupplier implements Supplier<OracleNoSQLDocumentManager> {
11461140
11471141
@Produces
1148-
public ArangoDBDocumentManager get() {
1142+
public OracleNoSQLDocumentManager get() {
11491143
Settings settings = Settings.builder().put("credential", "value").build();
1150-
ArangoDBDocumentConfiguration configuration = new ArangoDBDocumentConfiguration();
1151-
ArangoDBDocumentManagerFactory factory = configuration.apply(settings);
1144+
OracleDocumentConfiguration configuration = new OracleDocumentConfiguration();
1145+
OracleDocumentManagerFactory factory = configuration.apply(settings);
11521146
return factory.apply("database");
11531147
}
11541148
}
@@ -1157,61 +1151,32 @@ public class ManagerSupplier implements Supplier<ArangoDBDocumentManager> {
11571151

11581152
=== Repository
11591153

1160-
The ```ArangoDBRepository``` interface is an extension of the Repository interface that allows execution of AQL via the ```@AQL``` annotation. Also, it's possible to combine with ```@Param``` annotation to execute parameterized AQL queries:
1154+
The ```OracleNoSQLRepository``` interface is an extension of the Repository interface that allows execution of SQL via the ```@SQL``` annotation. Also, it's possible to combine with ```@Param``` annotation to execute parameterized SQL queries:
11611155

11621156
[source,java]
11631157
----
11641158
@Repository
1165-
interface PersonRepository extends ArangoDBRepository<Person, String> {
1159+
interface PersonRepository extends OracleNoSQLRepository<Person, String> {
11661160
1167-
@AQL("FOR p IN Person RETURN p")
1161+
@SQL("select * from Person")
11681162
List<Person> findAll();
11691163
1170-
@AQL("FOR p IN Person FILTER p.name = @name RETURN p")
1171-
List<Person> findByName(@Param("name") String name);
1172-
}
1173-
----
1174-
1175-
=== @AQL
1176-
1177-
The ```@AQL``` annotation is a mapping annotation that allows to define dynamic queries following link:https://www.arangodb.com/docs/stable/aql/[ArangoDB Query Languange] on ```ArangoDBRepository```.
1178-
1179-
[source,java]
1180-
----
1181-
interface CarRepository extends ArangoDBRepository<Car, String> {
1182-
1183-
@AQL("FOR c IN Car RETURN c")
1184-
List<Car> findAll();
1185-
1186-
}
1187-
----
1188-
1189-
=== @Param
1190-
1191-
For parameterized queries, use the ```@Param``` annotation for binding the target argument to the parameter informing the named parameter like the below example:
1192-
1193-
[source,java]
1194-
----
1195-
1196-
interface OrderRepository extends ArangoDBRepository<Order, String> {
1197-
1198-
@AQL("FOR o IN Order FILTER o.customer = @customer RETURN o")
1199-
List<Order> findByCustomer(@Param("customer") String customer);
1200-
1164+
@SQL("select * from Person where name = ?")
1165+
List<Person> findByName(@Param("") String name);
12011166
}
12021167
----
12031168

12041169

12051170
=== Template
12061171

1207-
The ```ArangoDBTemplate``` interface is a specialization of the ```DocumentTemplate``` interface that allows using both synchronous and asynchronous AQL.
1172+
The ```OracleNoSQLTemplate``` interface is a specialization of the ```DocumentTemplate``` interface that allows using synchronous SQL operation.
12081173

12091174
[source,java]
12101175
----
12111176
@Inject
1212-
private ArangoDBTemplate template;
1177+
private OracleNoSQLTemplate template;
12131178
...
1214-
List<Person> people = template.aql("FOR p IN Person FILTER p.name = @name RETURN p", params);
1179+
List<Person> people = template.sql("select * from people where people.content.name =?", "Ada");
12151180
----
12161181

12171182

0 commit comments

Comments
 (0)