Skip to content

Commit

Permalink
refactor: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
bostick authored Aug 16, 2023
1 parent d370eea commit 8e999fe
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 56 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Release 3.7.15-SNAPSHOT-2
* Issue #46 - org.sqlite.MetaData.getExportedKeys constructs incorrect SQL
* Issue #44 - getExportedKeys throws Null Exception for foreign key without explicit primary column name
1. Now returns keys for foreign key definitions like "create table referring (id, foreign key references referred)"
* Implemented getPercision(int) and getScale(int) on ResultSetMetaData.
* Implemented getPrecision(int) and getScale(int) on ResultSetMetaData.
* Issue #43 - ResultSetMetaData does not return the SQL Type if there are no results from the query.
1. ResultSetMetaData.getColumnTypeName() now gets type from either 'create table' statement or CAST(expr AS TYPE) otherwise sqlite3_value_type.
2. ResultSetMetaData.getColumnType() now parses the result from getColumnTypeName() to return a type.
Expand Down
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Bring back Linux armv6 support (#628)
* FreeBSD x86 and x86_64 (#639)
* Dropped DragonFlyBSD support (#641)
* Other Intenal Fixes
* Other Internal Fixes
* Add reflect-config, jni-config and native-image.properties to graalvm native image compilation (#631)
* Fix multipleClassLoader test when directory is renamed (#647)
* CI tests for Windows and MacOS (#645)
Expand Down Expand Up @@ -40,7 +40,7 @@
* Enable SQLITE_MAX_MMAP_SIZE compile option again.
* Fixes issues when using Arm Cortex A8, A9 (32-bit architecture)
* 2020-07-15: sqlite-jdbc-3.32.3.1
* Remove SQLITE_MAX_MMAP_SIZE compile option, which might be causing performance issuess.
* Remove SQLITE_MAX_MMAP_SIZE compile option, which might be causing performance issues.
* 2020-06-18: sqlite-jdbc-3.32.3
* Fix multiple CVE reported issues https://github.com/xerial/sqlite-jdbc/issues/501
* 2020-05-04: sqlite-jdbc-3.31.1
Expand Down Expand Up @@ -183,7 +183,7 @@
If you have already downloaded 3.6.4, please obtain the latest one on the download page.
* 2008 October 16th: sqlite-jdbc-3.6.4 released.
* Changes from SQLite 3.6.3: <https://www.sqlite.org/releaselog/3_6_4.html>
* `R*-Tree` index and `UPDATE/DELTE` syntax with `LIMIT` clause are available from this build.
* `R*-Tree` index and `UPDATE/DELETE` syntax with `LIMIT` clause are available from this build.
* 2008 October 14th: sqlite-jdbc-3.6.3 released. Compatible with SQLite 3.6.3.
* 2008 September 18th: sqlite-jdbc-3.6.2 released. Compatible with SQLite 3.6.2
and contains pure-java and native versions.
Expand Down
12 changes: 6 additions & 6 deletions SQLiteJDBC.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

SQLite JDBC driver developed by [wiki:leo Taro L. Saito] is an extension of [http://www.zentus.com/sqlitejdbc Zentus's SQLite JDBC driver] that enables Java to access [https://www.sqlite.org SQLite] database files.

Our SQLiteJDBC library, developed as a part of [http://www.xerial.org Xerial project], requires no configuration since all native libraries for Windows, Mac OS X, Linux and pure-java SQLite, which works in any OS enviroment, are assembled into a single JAR (Java Archive) file. The usage is quite simple; [#Download Download] our sqlite-jdbc library, then append the library (JAR file) to your class path. See [#Usage the sample code].
Our SQLiteJDBC library, developed as a part of [http://www.xerial.org Xerial project], requires no configuration since all native libraries for Windows, Mac OS X, Linux and pure-java SQLite, which works in any OS environment, are assembled into a single JAR (Java Archive) file. The usage is quite simple; [#Download Download] our sqlite-jdbc library, then append the library (JAR file) to your class path. See [#Usage the sample code].

== What is different from Zentus's SQLite JDBC? ==

The original Zentus's SQLite JDBC driver http://www.zentus.com/sqlitejdbc/ itself is an excellent utility for using [https://www.sqlite.org SQLite] databases from Java language, and our SQLiteJDBC library also relies on its implementation. However, its pure-java version, which totally translates c/c++ codes of SQLite into Java, is significantly slower compared to its native version, which uses SQLite binaries compiled for each OS (win, mac, linux).

To use the native version of sqlite-jdbc, user had to set a path to the native codes (dll, dylib, so files, which are JNDI C programs) by using command-line arguments, e.g., -Djava.library.path=(path to the dll, dylib, etc.), or -Dorg.sqlite.lib.path, etc. This process was error-prone and bothersome to tell every user to set these variables. Our SQLiteJDBC library completely does away these inconveniences.

Another difference is that we are keeping this SQLiteJDBC libray up-to-date to the newest version of SQLite engine, because we are one of the hottest users of this library. For example, SQLite JDBC is a core component of [http://utgenome.org/ UTGB (University of Tokyo Genome Browser) Toolkit], which is our utility to create personalized genome browsers.
Another difference is that we are keeping this SQLiteJDBC library up-to-date to the newest version of SQLite engine, because we are one of the hottest users of this library. For example, SQLite JDBC is a core component of [http://utgenome.org/ UTGB (University of Tokyo Genome Browser) Toolkit], which is our utility to create personalized genome browsers.

== Public Discussion Forum ==
* Post bug reports or feature requests to [http://groups.google.com/group/xerial?hl=en Xerial Public Discussion Group]
Expand All @@ -22,7 +22,7 @@ Another difference is that we are keeping this SQLiteJDBC libray up-to-date to t
* 2010 April 3rd: beta release of sqlite-jdbc-3.6.23.1-SNAPSHOT: http://www.xerial.org/maven/repository/snapshot/org/xerial/sqlite-jdbc/
* Added online backup/restore functions. Syntax: backup to (file name), restore from (file name).
* 2009 December 10th: [http://www.xerial.org/maven/repository/artifact/org/xerial/sqlite-jdbc/3.6.20.1/ sqlite-jdbc-3.6.20.1] release.
* Read-only conection, recursive trigger, foreign key validation support etc. using SQLiteConfig class.
* Read-only connection, recursive trigger, foreign key validation support etc. using SQLiteConfig class.
{{{
#!java
SQLiteConfig config = new SQLiteConfig();
Expand All @@ -37,7 +37,7 @@ Connection conn = DriverManager.getConnection("jdbc:sqlite:sample.db", config.to
* 2009 August 19th: [http://www.xerial.org/maven/repository/artifact/org/xerial/sqlite-jdbc/3.6.17.1/ sqlite-jdbc-3.6.17.1] released.
* 2009 July 2nd: [http://www.xerial.org/maven/repository/artifact/org/xerial/sqlite-jdbc/3.6.16/ sqlite-jdbc-3.6.16] release.
* 2009 June 4th: [http://www.xerial.org/maven/repository/artifact/org/xerial/sqlite-jdbc/3.6.14.2/ sqlite-jdbc-3.6.14.2] released.
* 2009 May 19th: [http://www.xerial.org/maven/repository/artifact/org/xerial/sqlite-jdbc/3.6.14.1/ sqlite-jdbc-3.6.14.1] released. This version supports "jdbc:sqlite::resource:" syntax to access read-only DB files contained in JAR archives, or external resources specified via URL, local files address etc. (see also the [http://groups.google.com/group/xerial/browse_thread/thread/39acb38f99eb2469/fc6afceabeaa0f76?lnk=gst&q=resource#fc6afceabeaa0f76 detailes])
* 2009 May 19th: [http://www.xerial.org/maven/repository/artifact/org/xerial/sqlite-jdbc/3.6.14.1/ sqlite-jdbc-3.6.14.1] released. This version supports "jdbc:sqlite::resource:" syntax to access read-only DB files contained in JAR archives, or external resources specified via URL, local files address etc. (see also the [http://groups.google.com/group/xerial/browse_thread/thread/39acb38f99eb2469/fc6afceabeaa0f76?lnk=gst&q=resource#fc6afceabeaa0f76 details])

* 2009 February 18th: sqlite-jdbc-3.6.11 released.
* Fixed a bug in !PrepStmt, which does not clear the batch contents after executeBatch(). [http://groups.google.com/group/xerial/browse_thread/thread/1fa83eb36f6d5dab Discussion].
Expand Down Expand Up @@ -71,7 +71,7 @@ Connection conn = DriverManager.getConnection("jdbc:sqlite:sample.db", config.to
* 2008 Mar. 18th: sqlite-jdbc-3.5.7 released. This version corresponds to [https://www.sqlite.org/releaselog/3_5_7.html SQLite 3.5.7].
* 2008 Mar. 10th: sqlite-jdbc-v042 released. Corresponding to SQLite 3.5.6, which integrates FTS3 (full text search).
* 2008 Jan. 31st: sqlite-jdbc-v038.4 released. SQLiteJDBCLoder.initialize() is no longer requried.
* 2008 Jan. 31st: sqlite-jdbc-v038.4 released. SQLiteJDBCLoder.initialize() is no longer required.
* 2008 Jan. 11th: The Jar files for Windows, Mac OS X and Linux are packed into a single Jar file! So, no longer need to use an OS-specific jar file.
* 2007 Dec. 31th: Upgraded to sqlitejdbc-v038
Expand Down Expand Up @@ -292,7 +292,7 @@ It does not require you to:
See License FAQ http://www.apache.org/foundation/licence-FAQ.html for more details.

== Using SQLiteJDBC with Maven2 ==
If you are familier with [http://maven.apache.org Maven2], add the following XML fragments into your pom.xml file. With those settings, your Maven will automatically download our SQLiteJDBC library into your local Maven repository, since our sqlite-jdbc libraries are synchronized with the [http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/ Maven's central repository].
If you are familiar with [http://maven.apache.org Maven2], add the following XML fragments into your pom.xml file. With those settings, your Maven will automatically download our SQLiteJDBC library into your local Maven repository, since our sqlite-jdbc libraries are synchronized with the [http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/ Maven's central repository].

{{{
#!xml
Expand Down
28 changes: 14 additions & 14 deletions src/main/ext/extension-functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static int sqlite3ReadUtf8(const unsigned char *z){
#define sqliteCharVal(X) sqlite3ReadUtf8(X)

/*
** This is a macro that facilitates writting wrappers for math.h functions
** This is a macro that facilitates writing wrappers for math.h functions
** it creates code for a function to use in SQlite that gets one numeric input
** and returns a floating point value.
**
Expand Down Expand Up @@ -362,7 +362,7 @@ static void name(sqlite3_context *context, int argc, sqlite3_value **argv){\
*/
GEN_MATH_WRAP_DOUBLE_1(sqrtFunc, sqrt)

/* trignometric functions */
/* trigonometric functions */
GEN_MATH_WRAP_DOUBLE_1(acosFunc, acos)
GEN_MATH_WRAP_DOUBLE_1(asinFunc, asin)
GEN_MATH_WRAP_DOUBLE_1(atanFunc, atan)
Expand Down Expand Up @@ -595,7 +595,7 @@ static void atn2Func(sqlite3_context *context, int argc, sqlite3_value **argv){
** Implementation of the sign() function
** return one of 3 possibilities +1,0 or -1 when the argument is respectively
** positive, 0 or negative.
** When the argument is NULL the result is also NULL (completly conventional)
** When the argument is NULL the result is also NULL (completely conventional)
*/
static void signFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
double rVal=0.0;
Expand Down Expand Up @@ -677,7 +677,7 @@ static void floorFunc(sqlite3_context *context, int argc, sqlite3_value **argv){

/*
** Given a string (s) in the first argument and an integer (n) in the second returns the
** string that constains s contatenated n times
** string that constains s concatenated n times
*/
static void replicateFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
unsigned char *z; /* input string */
Expand Down Expand Up @@ -769,7 +769,7 @@ static void properFunc(sqlite3_context *context, int argc, sqlite3_value **argv)
}

/*
** given an input string (s) and an integer (n) adds spaces at the begining of s
** given an input string (s) and an integer (n) adds spaces at the beginning of s
** until it has a length of n characters.
** When s has a length >=n it's a NOP
** padl(NULL) = NULL
Expand Down Expand Up @@ -877,7 +877,7 @@ static void padrFunc(sqlite3_context *context, int argc, sqlite3_value **argv){

/*
** given an input string (s) and an integer (n) appends spaces at the end of s
** and adds spaces at the begining of s until it has a length of n characters.
** and adds spaces at the beginning of s until it has a length of n characters.
** Tries to add has many characters at the left as at the right.
** When s has a length >=n it's a NOP
** padl(NULL) = NULL
Expand Down Expand Up @@ -989,10 +989,10 @@ static void strfilterFunc(sqlite3_context *context, int argc, sqlite3_value **ar
}

/*
** Given a string z1, retutns the (0 based) index of it's first occurence
** Given a string z1, returns the (0 based) index of it's first occurrence
** in z2 after the first s characters.
** Returns -1 when there isn't a match.
** updates p to point to the character where the match occured.
** updates p to point to the character where the match occurred.
** This is an auxiliary function.
*/
static int _substr(const char* z1, const char* z2, int s, const char** p){
Expand Down Expand Up @@ -1038,7 +1038,7 @@ static int _substr(const char* z1, const char* z2, int s, const char** p){

/*
** given 2 input strings (s1,s2) and an integer (n) searches from the nth character
** for the string s1. Returns the position where the match occured.
** for the string s1. Returns the position where the match occurred.
** Characters are counted from 1.
** 0 is returned when no match occurs.
*/
Expand Down Expand Up @@ -1163,7 +1163,7 @@ static void rightFunc(sqlite3_context *context, int argc, sqlite3_value **argv){

#ifndef HAVE_TRIM
/*
** removes the whitespaces at the begining of a string.
** removes the whitespaces at the beginning of a string.
*/
const char* ltrim(const char* s){
while( *s==' ' )
Expand All @@ -1183,7 +1183,7 @@ void rtrim(char* s){
}

/*
** Removes the whitespace at the begining of a string
** Removes the whitespace at the beginning of a string
*/
static void ltrimFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
const char *z;
Expand Down Expand Up @@ -1220,7 +1220,7 @@ static void rtrimFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
}

/*
** Removes the whitespace at the begining and end of a string
** Removes the whitespace at the beginning and end of a string
*/
static void trimFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
const char *z;
Expand Down Expand Up @@ -1366,7 +1366,7 @@ static void reverseFunc(sqlite3_context *context, int argc, sqlite3_value **argv
/*
** An instance of the following structure holds the context of a
** stdev() or variance() aggregate computation.
** implementaion of http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Algorithm_II
** implementation of http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Algorithm_II
** less prone to rounding errors
*/
typedef struct StdevCtx StdevCtx;
Expand All @@ -1382,7 +1382,7 @@ struct StdevCtx {
** Depends on structures defined in map.c (see map & map)
** These aggregate functions only work for integers and floats although
** they could be made to work for strings. This is usually considered meaningless.
** Only usuall order (for median), no use of collation functions (would this even make sense?)
** Only usual order (for median), no use of collation functions (would this even make sense?)
*/
typedef struct ModeCtx ModeCtx;
struct ModeCtx {
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/sqlite/SQLiteConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private boolean getBoolean(Pragma pragma, String defaultValue) {
}

/**
* Retrives a pragma integer value.
* Retrieves a pragma integer value.
*
* @param pragma The pragma.
* @param defaultValue The default value.
Expand Down Expand Up @@ -838,7 +838,7 @@ public void setJournalMode(JournalMode mode) {
* @see <a
* href="https://www.sqlite.org/pragma.html#pragma_journal_size_limit">www.sqlite.org/pragma.html#pragma_journal_size_limit</a>
*/
public void setJounalSizeLimit(int limit) {
public void setJournalSizeLimit(int limit) {
set(Pragma.JOURNAL_SIZE_LIMIT, limit);
}

Expand Down Expand Up @@ -913,14 +913,14 @@ public void setMaxPageCount(int numPages) {
}

/**
* Enables or disables useReadUncommitedIsolationMode.
* Enables or disables useReadUncommittedIsolationMode.
*
* @param useReadUncommitedIsolationMode True to turn on; false to disable. disabled otherwise.
* @param useReadUncommittedIsolationMode True to turn on; false to disable. disabled otherwise.
* @see <a
* href="https://www.sqlite.org/pragma.html#pragma_read_uncommitted">www.sqlite.org/pragma.html#pragma_read_uncommitted</a>
*/
public void setReadUncommited(boolean useReadUncommitedIsolationMode) {
set(Pragma.READ_UNCOMMITTED, useReadUncommitedIsolationMode);
public void setReadUncommitted(boolean useReadUncommittedIsolationMode) {
set(Pragma.READ_UNCOMMITTED, useReadUncommittedIsolationMode);
}

/**
Expand Down Expand Up @@ -1086,7 +1086,7 @@ public void setApplicationId(int id) {
public enum TransactionMode implements PragmaValue {
/** @deprecated Use {@code DEFERRED} instead. */
@Deprecated
DEFFERED,
DEFFERED, // cspell:disable-line
DEFERRED,
IMMEDIATE,
EXCLUSIVE;
Expand All @@ -1096,7 +1096,7 @@ public String getValue() {
}

public static TransactionMode getMode(String mode) {
if ("DEFFERED".equalsIgnoreCase(mode)) {
if ("DEFFERED".equalsIgnoreCase(mode)) { // cspell:disable-line
return DEFERRED;
}
return TransactionMode.valueOf(mode.toUpperCase());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/sqlite/SQLiteConnectionConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public SQLiteConfig.TransactionMode getTransactionMode() {

@SuppressWarnings("deprecation")
public void setTransactionMode(SQLiteConfig.TransactionMode transactionMode) {
if (transactionMode == SQLiteConfig.TransactionMode.DEFFERED) {
if (transactionMode == SQLiteConfig.TransactionMode.DEFFERED) { // cspell:disable-line
transactionMode = SQLiteConfig.TransactionMode.DEFERRED;
}
this.transactionMode = transactionMode;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/sqlite/SQLiteDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public void setJournalMode(String mode) {
* https://www.sqlite.org/pragma.html#pragma_journal_size_limit</a>
*/
public void setJournalSizeLimit(int limit) {
config.setJounalSizeLimit(limit);
config.setJournalSizeLimit(limit);
}

/**
Expand Down Expand Up @@ -343,20 +343,20 @@ public void setMaxPageCount(int numPages) {
/**
* Set READ UNCOMMITTED isolation
*
* @param useReadUncommitedIsolationMode True to turn on; false to turn off.
* @param useReadUncommittedIsolationMode True to turn on; false to turn off.
* @see <a
* href="https://www.sqlite.org/pragma.html#pragma_read_uncommitted">https://www.sqlite.org/pragma.html#pragma_read_uncommitted</a>
*/
public void setReadUncommited(boolean useReadUncommitedIsolationMode) {
config.setReadUncommited(useReadUncommitedIsolationMode);
public void setReadUncommitted(boolean useReadUncommittedIsolationMode) {
config.setReadUncommitted(useReadUncommittedIsolationMode);
}

/**
* Enables or disables the recursive trigger capability. Changing the recursive_triggers setting
* affects the execution of all statements prepared using the database connection, including
* those prepared before the setting was changed.
*
* @param enable True to enable; fase to disable.
* @param enable True to enable; false to disable.
* @see <a
* href="https://www.sqlite.org/pragma.html#pragma_recursive_triggers">https://www.sqlite.org/pragma.html#pragma_recursive_triggers</a>
*/
Expand All @@ -369,7 +369,7 @@ public void setRecursiveTriggers(boolean enable) {
* statements without an ORDER BY clause to emit their results in the reverse order of what they
* normally would.
*
* @param enable True to enable; fase to disable.
* @param enable True to enable; false to disable.
* @see <a
* href="https://www.sqlite.org/pragma.html#pragma_reverse_unordered_selects">https://www.sqlite.org/pragma.html#pragma_reverse_unordered_selects</a>
*/
Expand All @@ -381,7 +381,7 @@ public void setReverseUnorderedSelects(boolean enable) {
* Enables or disables the short_column_names flag. This flag affects the way SQLite names
* columns of data returned by SELECT statements.
*
* @param enable True to enable; fase to disable.
* @param enable True to enable; false to disable.
* @see <a
* href="https://www.sqlite.org/pragma.html#pragma_short_column_names">https://www.sqlite.org/pragma.html#pragma_short_column_names</a>
* @see <a
Expand Down
Loading

0 comments on commit 8e999fe

Please sign in to comment.