Initial Development #1

Merged
danieljsummers merged 88 commits from v1-rc into main 2025-04-16 01:29:20 +00:00
12 changed files with 110 additions and 25 deletions
Showing only changes of commit 7cb7abd0e1 - Show all commits

View File

@ -108,19 +108,23 @@
</execution>
</executions>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javaDocPlugin.version}</version>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<reportUndocumented>true</reportUndocumented>
<includes>${project.basedir}/src/main/module-info.md</includes>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
<goal>javadocJar</goal>
</goals>
</execution>
</executions>
</plugin> -->
</plugin>
</plugins>
</build>

View File

@ -26,6 +26,10 @@ object Configuration {
/** The connection string for the JDBC connection */
@JvmStatic
var connectionString: String? = null
/**
* Set a value for the connection string
* @param value The connection string to set
*/
set(value) {
field = value
dialectValue = if (value.isNullOrBlank()) null else Dialect.deriveFromConnectionString(value)

View File

@ -9,6 +9,9 @@ import java.sql.SQLException
import java.util.*
import kotlin.jvm.Throws
/**
* Functions to run custom queries
*/
object Custom {
/**

View File

@ -7,6 +7,9 @@ import java.sql.PreparedStatement
import java.sql.ResultSet
import java.sql.SQLException
/**
* Functions to create results from queries
*/
object Results {
/**

View File

@ -0,0 +1,19 @@
# Module core
This module contains configuration and support files for the document store API, as well as an implementation suitable for any JVM language.
# Package solutions.bitbadger.documents
Configuration and other items to support the document store API
# Package solutions.bitbadger.documents.query
Functions to create document manipulation queries
# Package solutions.bitbadger.documents.java
A Java-focused implementation of the document store API
# Package solutions.bitbadger.documents.java.extensions
Extensions on the Java `Connection` object for document manipulation

View File

@ -103,6 +103,19 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javaDocPlugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -1,3 +1,7 @@
/**
* This module registers the Kotlin extension methods for the JDBC <code>Connection</code> object with the Groovy
* runtime
*/
module solutions.bitbadger.documents.groovy {
requires solutions.bitbadger.documents.core;
}

View File

@ -0,0 +1,7 @@
package solutions.bitbadger.documents.groovy;
/**
* This library has no classes; it only updates Groovy's configuration
*/
public interface NoClassesHere {
}

View File

@ -0,0 +1,11 @@
/**
* Groovy extensions on the JDBC <code>Connection</code> object exposing a document store API
* <p>
* This package wires up the <code>core</code> extensions to work in Groovy. No imports are needed, and the
* documentation for the <code>solutions.bitbadger.documents.java.extensions</code> package applies to those extensions
* as well.
* <p>
* For example, finding all documents in a table, using the document manipulation functions, looks something like
* <code>Find.all(tableName, conn)</code>; with the extensions, this becomes <code>conn.findAll(tableName)</code>.
*/
package solutions.bitbadger.documents.groovy;

View File

@ -139,6 +139,23 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<reportUndocumented>true</reportUndocumented>
<includes>${project.basedir}/src/main/module-info.md</includes>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>javadocJar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,11 @@
# Module kotlinx
This module contains an implementation of the document store API which uses a `kotlinx.serialization`-based serializer (relies on reified generics)
# Package solutions.bitbadger.documents.kotlinx
The document store API based on `kotlinx.serialization`
# Package solutions.bitbadger.documents.kotlinx.extensions
Extensions on the Java `Connection` object for document manipulation

View File

@ -32,6 +32,13 @@
<goal>testCompile</goal>
</goals>
</execution>
<!-- <execution>
<phase>package</phase>
<id>attach-javadocs</id>
<goals>
<goal>doc-jar</goal>
</goals>
</execution> -->
</executions>
<configuration>
<source>${java.version}</source>
@ -63,24 +70,6 @@
<target>${java.version}</target>
</configuration>
</plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${buildHelperPlugin.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/kotlin</source>
</sources>
</configuration>
</execution>
</executions>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>