mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 04:24:21 +01:00
Change package name from org.github.tursodatabase to tech.turso
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
package org.github.tursodatabase;
|
||||
package tech.turso;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import org.github.tursodatabase.jdbc4.JDBC4Connection;
|
||||
import org.github.tursodatabase.utils.Logger;
|
||||
import org.github.tursodatabase.utils.LoggerFactory;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
import tech.turso.jdbc4.JDBC4Connection;
|
||||
import tech.turso.utils.Logger;
|
||||
import tech.turso.utils.LoggerFactory;
|
||||
|
||||
public class JDBC implements Driver {
|
||||
private static final Logger logger = LoggerFactory.getLogger(JDBC.class);
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase;
|
||||
package tech.turso;
|
||||
|
||||
import java.sql.DriverPropertyInfo;
|
||||
import java.util.Arrays;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase;
|
||||
package tech.turso;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
@@ -7,8 +7,8 @@ import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Logger;
|
||||
import javax.sql.DataSource;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
|
||||
/** Provides {@link DataSource} API for configuring Limbo database connection. */
|
||||
public class LimboDataSource implements DataSource {
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.github.tursodatabase;
|
||||
package tech.turso;
|
||||
|
||||
import org.github.tursodatabase.core.SqliteCode;
|
||||
import tech.turso.core.SqliteCode;
|
||||
|
||||
/** Limbo error code. Superset of SQLite3 error code. */
|
||||
public enum LimboErrorCode {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.annotations;
|
||||
package tech.turso.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.annotations;
|
||||
package tech.turso.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.annotations;
|
||||
package tech.turso.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.annotations;
|
||||
package tech.turso.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -1,14 +1,14 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import static org.github.tursodatabase.utils.ByteArrayUtils.stringToUtf8ByteArray;
|
||||
import static tech.turso.utils.ByteArrayUtils.stringToUtf8ByteArray;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.annotations.NativeInvocation;
|
||||
import org.github.tursodatabase.utils.LimboExceptionUtils;
|
||||
import org.github.tursodatabase.utils.Logger;
|
||||
import org.github.tursodatabase.utils.LoggerFactory;
|
||||
import tech.turso.annotations.NativeInvocation;
|
||||
import tech.turso.utils.LimboExceptionUtils;
|
||||
import tech.turso.utils.Logger;
|
||||
import tech.turso.utils.LoggerFactory;
|
||||
|
||||
public class LimboConnection {
|
||||
private static final Logger logger = LoggerFactory.getLogger(LimboConnection.class);
|
||||
@@ -1,18 +1,18 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import static org.github.tursodatabase.utils.ByteArrayUtils.stringToUtf8ByteArray;
|
||||
import static tech.turso.utils.ByteArrayUtils.stringToUtf8ByteArray;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.sql.SQLException;
|
||||
import org.github.tursodatabase.LimboErrorCode;
|
||||
import org.github.tursodatabase.annotations.NativeInvocation;
|
||||
import org.github.tursodatabase.annotations.VisibleForTesting;
|
||||
import org.github.tursodatabase.utils.LimboExceptionUtils;
|
||||
import org.github.tursodatabase.utils.Logger;
|
||||
import org.github.tursodatabase.utils.LoggerFactory;
|
||||
import tech.turso.LimboErrorCode;
|
||||
import tech.turso.annotations.NativeInvocation;
|
||||
import tech.turso.annotations.VisibleForTesting;
|
||||
import tech.turso.utils.LimboExceptionUtils;
|
||||
import tech.turso.utils.Logger;
|
||||
import tech.turso.utils.LoggerFactory;
|
||||
|
||||
/** This class provides a thin JNI layer over the SQLite3 C API. */
|
||||
public final class LimboDB implements AutoCloseable {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.Properties;
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.utils.Logger;
|
||||
import org.github.tursodatabase.utils.LoggerFactory;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.utils.Logger;
|
||||
import tech.turso.utils.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A table of data representing limbo database result set, which is generated by executing a
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import org.github.tursodatabase.annotations.NativeInvocation;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.utils.LimboExceptionUtils;
|
||||
import org.github.tursodatabase.utils.Logger;
|
||||
import org.github.tursodatabase.utils.LoggerFactory;
|
||||
import tech.turso.annotations.NativeInvocation;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.utils.LimboExceptionUtils;
|
||||
import tech.turso.utils.Logger;
|
||||
import tech.turso.utils.LoggerFactory;
|
||||
|
||||
/**
|
||||
* By default, only one <code>resultSet</code> object per <code>LimboStatement</code> can be open at
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import java.util.Arrays;
|
||||
import org.github.tursodatabase.annotations.NativeInvocation;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import tech.turso.annotations.NativeInvocation;
|
||||
import tech.turso.annotations.Nullable;
|
||||
|
||||
/** Represents the step result of limbo's statement's step function. */
|
||||
public class LimboStepResult {
|
||||
@@ -13,7 +13,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
/** Sqlite error codes. */
|
||||
public class SqliteCode {
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.github.tursodatabase.exceptions;
|
||||
package tech.turso.exceptions;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import org.github.tursodatabase.LimboErrorCode;
|
||||
import tech.turso.LimboErrorCode;
|
||||
|
||||
public class LimboException extends SQLException {
|
||||
private final LimboErrorCode resultCode;
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Executor;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import org.github.tursodatabase.core.LimboConnection;
|
||||
import org.github.tursodatabase.core.LimboStatement;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
import tech.turso.core.LimboConnection;
|
||||
import tech.turso.core.LimboStatement;
|
||||
|
||||
public class JDBC4Connection implements Connection {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -10,10 +10,10 @@ import java.sql.RowIdLifetime;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import org.github.tursodatabase.utils.Logger;
|
||||
import org.github.tursodatabase.utils.LoggerFactory;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
import tech.turso.utils.Logger;
|
||||
import tech.turso.utils.LoggerFactory;
|
||||
|
||||
public class JDBC4DatabaseMetaData implements DatabaseMetaData {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
@@ -22,8 +22,8 @@ import java.sql.SQLXML;
|
||||
import java.sql.Time;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import org.github.tursodatabase.core.LimboResultSet;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
import tech.turso.core.LimboResultSet;
|
||||
|
||||
public class JDBC4PreparedStatement extends JDBC4Statement implements PreparedStatement {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
@@ -22,9 +22,9 @@ import java.sql.Time;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import org.github.tursodatabase.core.LimboResultSet;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
import tech.turso.core.LimboResultSet;
|
||||
|
||||
public class JDBC4ResultSet implements ResultSet {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
@@ -8,10 +8,10 @@ import java.sql.SQLException;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.Statement;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import org.github.tursodatabase.core.LimboResultSet;
|
||||
import org.github.tursodatabase.core.LimboStatement;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
import tech.turso.core.LimboResultSet;
|
||||
import tech.turso.core.LimboStatement;
|
||||
|
||||
public class JDBC4Statement implements Statement {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.github.tursodatabase.utils;
|
||||
package tech.turso.utils;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import tech.turso.annotations.Nullable;
|
||||
|
||||
public class ByteArrayUtils {
|
||||
@Nullable
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.github.tursodatabase.utils;
|
||||
package tech.turso.utils;
|
||||
|
||||
import static org.github.tursodatabase.utils.ByteArrayUtils.utf8ByteBufferToString;
|
||||
import static tech.turso.utils.ByteArrayUtils.utf8ByteBufferToString;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import org.github.tursodatabase.LimboErrorCode;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
import org.github.tursodatabase.exceptions.LimboException;
|
||||
import tech.turso.LimboErrorCode;
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.exceptions.LimboException;
|
||||
|
||||
public class LimboExceptionUtils {
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.utils;
|
||||
package tech.turso.utils;
|
||||
|
||||
/** A simple internal Logger interface. */
|
||||
public interface Logger {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.utils;
|
||||
package tech.turso.utils;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
@@ -1 +1 @@
|
||||
org.github.tursodatabase.JDBC
|
||||
tech.turso.JDBC
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.github.tursodatabase;
|
||||
package tech.turso;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.jdbc4.JDBC4Connection;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.jdbc4.JDBC4Connection;
|
||||
|
||||
public class IntegrationTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase;
|
||||
package tech.turso;
|
||||
|
||||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
||||
|
||||
@@ -6,8 +6,8 @@ import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.jdbc4.JDBC4Connection;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.jdbc4.JDBC4Connection;
|
||||
|
||||
class JDBCTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase;
|
||||
package tech.turso;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.TestUtils;
|
||||
|
||||
class LimboDBFactoryTest {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import org.github.tursodatabase.LimboErrorCode;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.github.tursodatabase.exceptions.LimboException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.LimboErrorCode;
|
||||
import tech.turso.TestUtils;
|
||||
import tech.turso.exceptions.LimboException;
|
||||
|
||||
public class LimboDBTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.core;
|
||||
package tech.turso.core;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
@@ -7,10 +7,10 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.github.tursodatabase.jdbc4.JDBC4Connection;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.TestUtils;
|
||||
import tech.turso.jdbc4.JDBC4Connection;
|
||||
|
||||
class LimboStatementTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@@ -6,9 +6,9 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.TestUtils;
|
||||
|
||||
class JDBC4ConnectionTest {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.TestUtils;
|
||||
|
||||
class JDBC4DatabaseMetaDataTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
@@ -10,9 +10,9 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.TestUtils;
|
||||
|
||||
class JDBC4PreparedStatementTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
@@ -14,11 +14,11 @@ import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Stream;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import tech.turso.TestUtils;
|
||||
|
||||
class JDBC4ResultSetTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.github.tursodatabase.jdbc4;
|
||||
package tech.turso.jdbc4;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@@ -6,10 +6,10 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.Properties;
|
||||
import org.github.tursodatabase.TestUtils;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import tech.turso.TestUtils;
|
||||
|
||||
class JDBC4StatementTest {
|
||||
|
||||
Reference in New Issue
Block a user