monetdb-java: default - Remove onclient.txt. It is now made avai...
Changeset: fc32ba68a2cc for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/fc32ba68a2cc Removed Files: onclient.txt Modified Files: release.md Branch: default Log Message: Remove onclient.txt. It is now made available on https://www.monetdb.org/documentation-Aug2024/user-guide/client-interfaces/libraries-drivers/jdbc-driver/#on-client-extension diffs (163 lines): diff --git a/onclient.txt b/onclient.txt deleted file mode 100644 --- a/onclient.txt +++ /dev/null @@ -1,118 +0,0 @@ -COPY ... ON CLIENT ... support in the MonetDB JDBC driver and JdbcClient program. - -MonetDB provides the non-standard COPY INTO statement to perform bulk inserts and -retrievals, see also: -https://www.monetdb.org/documentation/user-guide/sql-manual/data-loading/copy-from/ -https://www.monetdb.org/documentation/user-guide/sql-manual/data-loading/export_data/ - -By default, COPY INTO accesses files on the server but it also has a mode to -access files on the client. This is supported by the command line tool -mclient(1) and now also as an extension to the MonetDB JDBC driver. - -This is how it works: The JDBC client automatically announces that it is capable -of file transfers. If you execute, for example, - - COPY INTO mytable FROM 'data.csv' ON CLIENT; - -the server will send a request for file 'data.csv' to the JDBC driver. -By default, the JDBC driver will refuse with an error message: - 'No file upload handler has been registered with the JDBC driver' - -or in JdbcClient: - 'Error [42000] when opening data.csv: ON CLIENT: No file upload handler has been registered with the JDBC driver' - -This is for security reasons. However, you can register a callback to handle -these requests from the server: - - Connection conn = DriverManager.getConnection(dbUrl, userName, password); - MyUploader handler = new MyUploadHandler(); - conn.unwrap(MonetConnection.class).setUploadHandler(handler); - -or provide the JdbcClient startup argument: --csvdir "/path/to/csvfilesdir" - -Here, MyUploadHandler is an implementation of the interface MonetConnection.UploadHandler, -which signature looks like this: - - public interface UploadHandler { - /** -* Called if the server sends a request to read file data. -* -* Use the given handle to receive data or send errors to the server. -* -* @param handle Handle to communicate with the server -* @param name Name of the file the server would like to read. Make sure -* to validate this before reading from the file system -* @param textMode Whether to open the file as text or binary data. -* @param linesToSkip In text mode, number of initial lines to skip. -*0 means upload everything, 1 means skip the first line, etc. -*Note: this is different from the OFFSET option of the COPY INTO, -*where both 0 and 1 mean 'upload everything' -* @throws IOException when I/O problem occurs -*/ - void handleUpload(Upload handle, String name, boolean textMode, long linesToSkip) throws IOException; - - /** -* Called when the upload is cancelled halfway by the server. -* -* The default implementation does nothing. -*/ - default void uploadCancelled() {} - } - -In your implementation of handleUpload(), you can use the 'handle' object to -communicate with the server, for example: - -- PrintStream handle.getStream() to obtain a stream object to which you can write. - This is useful if you want to generate the data on the fly. - -- void uploadFrom(InputStream stream) to have the JDBC driver read data from the - stream and send it to the server as-is. For text mode uploads this means the - text must be UTF-8 encoded. - -- void handle.uploadFrom(Reader reader) to have the JDBC driver read text from the given - Reader and upload it. - -- void handle.uploadFrom(BufferedReader reader, long linesToSkip) to have the JDBC - driver read from the given BufferedReader and upload the text, skipping the first - 'linesToSkip' lines. Typically you would use the value passed to handleUpload in - parameter 'linesToSkip'. - -- void handle.sendError(String errorMessage) to refuse the upload. - -See also: - https://www.monetdb.org/hg/monetdb-java/file/tip/src/main/java/org/monetdb/jdbc/MonetConnection.java#l3546 - -If you use sendError() to refuse the upload, the COPY INTO statement will fail but -the connection will remain usable. On the other hand, if your implementation of -handleUpload throws an IOException, the connection will be closed because there -is currently no way to signal errors to the server once the transfer has
monetdb-java: default - Remove info on URL Format, Use and Notes...
Changeset: b21578cf909f for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/b21578cf909f Modified Files: release.md Branch: default Log Message: Remove info on URL Format, Use and Notes and tips. These have been moved to the web documentation page. diffs (159 lines): diff --git a/release.md b/release.md --- a/release.md +++ b/release.md @@ -2,7 +2,6 @@ RELEASE NOTES = MonetDB JDBC driver version 3.3 (Liberica) - Release date: 2023-02-23 The Java Database Connectivity (JDBC) API provides universal data access from @@ -14,145 +13,6 @@ For more information see https://www.mon The latest MonetDB JDBC driver can be downloaded from https://www.monetdb.org/downloads/Java/ -The sources for this JDBC driver and related Java programs can be found at: -https://dev.monetdb.org/hg/monetdb-java/file/tip - - -URL Format --- - -The MonetDB JDBC connection URL format is: - - -jdbc:monetdb://[[: ]]/ [? ] (not encrypted) -OR -jdbc:monetdbs://[ [: ]]/ [? ] (encrypted) - -where are &-separated: prop1=value1[&prop2=value2[&prop3=value3...]] - - -The second form (monetdbs) is for creating a TLS-protected connection. TLS (Transport Layer Security) -is the mechanism that is also used for HTTPS. - -Property keys and values support percent-escaped bytes. For example, the -password 'chocolate&cookies' can be passed as follows: `jdbc:monetdb:///demo?user=me&password=chocolate%26cookies`. - -Note: MonetDB-Java version 3.3 and earlier did not support percent-escapes. -If your password contains percent-characters, these must now be encoded as `%25`. - -Supported connection properties are: - -| Property | Default | Notes | -| - | --- | --- | -| user= | - | required | -| password= | - | required | -| so_timeout=
monetdb-java: default - rename release.md back to release.txt
Changeset: bd4964f4656e for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/bd4964f4656e Added Files: release.txt Removed Files: release.md Branch: default Log Message: rename release.md back to release.txt diffs (22 lines): diff --git a/release.md b/release.txt rename from release.md rename to release.txt --- a/release.md +++ b/release.txt @@ -1,5 +1,5 @@ -RELEASE NOTES -= +RELEASE INFO + MonetDB JDBC driver version 3.3 (Liberica) Release date: 2023-02-23 @@ -8,7 +8,7 @@ The Java Database Connectivity (JDBC) AP the Java programming language. The MonetDB JDBC driver is designed for use with MonetDB, an Open-Source column-store RDBMS. -For more information see https://www.monetdb.org/ +See https://www.monetdb.org/ The latest MonetDB JDBC driver can be downloaded from https://www.monetdb.org/downloads/Java/ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Cleanup.
Changeset: 557c67973cd8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/557c67973cd8 Modified Files: gdk/gdk.h gdk/gdk_align.c gdk/gdk_subquery.c gdk/gdk_system.h sql/backends/monet5/UDF/capi/capi.c Branch: default Log Message: Cleanup. Removed duplicated includes; we don't need the struct COLrec anymore; some other small stuff. diffs (233 lines): diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -310,14 +310,9 @@ #define _GDK_H_ /* standard includes upon which all configure tests depend */ -#ifdef HAVE_SYS_TYPES_H -# include -#endif #ifdef HAVE_SYS_STAT_H # include #endif -#include -#include #ifdef HAVE_UNISTD_H # include #endif @@ -711,38 +706,6 @@ gdk_export bool VALisnil(const ValRecord typedef struct PROPrec PROPrec; -/* see also comment near BATassertProps() for more information about - * the properties */ -typedef struct { - uint16_t width; /* byte-width of the atom array */ - int8_t type;/* type id. */ - uint8_t shift; /* log2 of bun width */ - bool key:1, /* no duplicate values present */ - nonil:1,/* there are no nils in the column */ - nil:1, /* there is a nil in the column */ - sorted:1, /* column is sorted in ascending order */ - revsorted:1,/* column is sorted in descending order */ - ascii:1;/* string column is fully ASCII (7 bit) */ - BUN nokey[2]; /* positions that prove key==FALSE */ - BUN nosorted; /* position that proves sorted==FALSE */ - BUN norevsorted;/* position that proves revsorted==FALSE */ - BUN minpos, maxpos; /* location of min/max value */ - double unique_est; /* estimated number of unique values */ - oid seq;/* start of dense sequence */ - - Heap *heap; /* space for the column. */ - BUN baseoff;/* offset in heap->base (in whole items) */ - Heap *vheap;/* space for the varsized data. */ - Hash *hash; /* hash table */ -#ifdef HAVE_RTREE - RTree *rtree; /* rtree geometric index */ -#endif - Heap *orderidx; /* order oid index */ - Strimps *strimps; /* string imprint index */ - - PROPrec *props; /* list of dynamic properties stored in the bat descriptor */ -} COLrec; - #define ORDERIDXOFF3 /* assert that atom width is power of 2, i.e., width == 1batCapacity = b->batCapacity; bn->batRestricted = BAT_READ; - /* the T column descriptor is fully copied except for the + /* the column descriptor is fully copied except for the * accelerator data. We need copies because in case of a mark, * we are going to override a column with a void. */ bn->tkey = bi.key; diff --git a/gdk/gdk_subquery.c b/gdk/gdk_subquery.c --- a/gdk/gdk_subquery.c +++ b/gdk/gdk_subquery.c @@ -493,8
MonetDB: default - Move typedef for gdk_callback into only file ...
Changeset: 35a4074cf885 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/35a4074cf885 Modified Files: gdk/gdk.h gdk/gdk_bbp.c Branch: default Log Message: Move typedef for gdk_callback into only file where it is used. diffs (40 lines): diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -2533,16 +2533,6 @@ TIMEOUT_TEST(QryCtx *qc) CALLBACK; \ } while (0) -typedef struct gdk_callback { - const char *name; - int argc; - int interval; // units sec - lng last_called; // timestamp GDKusec - gdk_return (*func)(int argc, void *argv[]); - struct gdk_callback *next; - void *argv[]; -} gdk_callback; - typedef gdk_return gdk_callback_func(int argc, void *argv[]); gdk_export gdk_return gdk_add_callback(const char *name, gdk_callback_func *f, diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -,6 +,16 @@ gdk_bbp_reset(void) static MT_Lock GDKCallbackListLock = MT_LOCK_INITIALIZER(GDKCallbackListLock); +typedef struct gdk_callback { + const char *name; + int argc; + int interval; // units sec + lng last_called; // timestamp GDKusec + gdk_return (*func)(int argc, void *argv[]); + struct gdk_callback *next; + void *argv[]; +} gdk_callback; + static struct { int cnt; gdk_callback *head; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
monetdb-java: default - Spell check.
Changeset: ff075ed5ce81 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/ff075ed5ce81 Modified Files: ChangeLog-Archive SQLSTATEs example/SQLImport.java src/main/java/org/monetdb/client/JdbcClient.java src/main/java/org/monetdb/jdbc/MonetBlob.java src/main/java/org/monetdb/jdbc/MonetClob.java src/main/java/org/monetdb/jdbc/MonetConnection.java src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java src/main/java/org/monetdb/jdbc/MonetResultSet.java src/main/java/org/monetdb/jdbc/MonetResultSetMetaData.java src/main/java/org/monetdb/jdbc/MonetStatement.java src/main/java/org/monetdb/mcl/net/MapiSocket.java src/main/java/org/monetdb/mcl/parser/MCLParser.java src/main/java/org/monetdb/mcl/parser/StartOfHeaderParser.java src/main/java/org/monetdb/merovingian/Control.java src/main/java/org/monetdb/util/Exporter.java tests/JDBC_API_Tester.java tests/OnClientTester.java tests/TLSTester.java Branch: default Log Message: Spell check. diffs (truncated from 552 to 300 lines): diff --git a/ChangeLog-Archive b/ChangeLog-Archive --- a/ChangeLog-Archive +++ b/ChangeLog-Archive @@ -126,7 +126,7 @@ We also provide a utility class: public class org.monetdb.util.FileTransferHandler which provides an example implementation of the MonetConnection.UploadHandler - and MonetConnection.DownloadHandler interfaces useable for reading files + and MonetConnection.DownloadHandler interfaces usable for reading files from or writing files to a local file system. * Mon Jun 14 2021 Martin van Dinther @@ -140,7 +140,7 @@ each column of the ResultSet. Now these metadata queries are combined into one query fetching this meta data for up to 50 columns in one query. This reduces the number of queries sent to the server significantly. - This is noticable for instance when using generic JDBC query tools + This is noticeable for instance when using generic JDBC query tools such as SQuirreL, DBeaver, which now respond much faster. * Wed Mar 3 2021 Martin van Dinther @@ -181,7 +181,7 @@ functionality to validate the integrity of the system tables (\vsci) or to validate the integrity of data in tables of a specific schema (\vsi xyz) based on defined declarative constraints (pkey, fkey, not null, etc.). - This will be usefull to find and report inconsistencies in your database. + This will be useful to find and report inconsistencies in your database. This functionality is a beta release. Please let us know if you encounter any issues running it. See below for more information. @@ -257,7 +257,7 @@ - Column NOT NULL constraint - Varchar(n) max length constraint - Idem for char(n), clob(n), blob(n), json(n) and url(n). - It can be usefull to run \vsci before and after an upgrade of MonetDB server. + It can be useful to run \vsci before and after an upgrade of MonetDB server. Use \vsi my_schema to validate data in all tables of a specific schema. Use \vdbi to validate integrity of data in all user schemas in the database. Note: this can take a while, depending on your number @@ -913,7 +913,7 @@ * Tue Nov 9 2010 Fabian Groffen - 1.40.1-20101110 - Fix SQL syntax of inserting BLOB code, using setBytes() -- Added propery 'treat_blob_as_binary' to simulate BINARY types based on +- Added property 'treat_blob_as_binary' to simulate BINARY types based on BLOBs for applications, (e.g. Hibernate-based) that rely on BINARY's byte array mapping - Added code to handle BINARY types diff --git a/SQLSTATEs b/SQLSTATEs --- a/SQLSTATEs +++ b/SQLSTATEs @@ -2,7 +2,7 @@ Following SQLStates are MonetDB JDBC dri 01M02 redirect warning 01M03 illegal arguments (invalid call of internal function) 01M07 unrecognised clientinfo property -01M08 read-only conection mode not supported +01M08 read-only connection mode not supported 01M09 transaction mode not supported 01M10 unexpected server output 01M11 server-client autocommit state mismatch diff --git a/example/SQLImport.java b/example/SQLImport.java --- a/example/SQLImport.java +++ b/example/SQLImport.java @@ -22,7 +22,7 @@ import java.io.*; * continues reading and executing lines. * A very lousy way of implementing options is used to somewhat configure the * behaviour of the program in order to be a bit more verbose or commit after - * each (sucessfully) executed line. + * each (successfully) executed line. * * The program uses a debuglog in which the exact conversation between the * JDBC driver and Mserver is reported. The log file is put in the current diff --git a/src/main/java/org/monetdb/client/JdbcClient.java b/src/main/java/org/monetdb/client/JdbcClient.java --- a/src/main/java/org/monetdb/client/JdbcClient.java +++ b/src/main/java/org/monetdb/client/JdbcClient.java @@ -108,7
monetdb-java: default - repair dependencies
Changeset: 4dd3bc7162f6 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/4dd3bc7162f6 Modified Files: build.xml build_jre17.xml build_jre21.xml Branch: default Log Message: repair dependencies diffs (201 lines): diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -19,7 +19,6 @@ Copyright 1997 - July 2008 CWI. - @@ -69,12 +68,13 @@ Copyright 1997 - July 2008 CWI. - + + @@ -88,11 +88,11 @@ Copyright 1997 - July 2008 CWI. + + + - - - @@ -102,8 +102,7 @@ Copyright 1997 - July 2008 CWI. - + @@ -275,11 +274,11 @@ Copyright 1997 - July 2008 CWI. - - - - + + + + diff --git a/build_jre17.xml b/build_jre17.xml --- a/build_jre17.xml +++ b/build_jre17.xml @@ -19,7 +19,6 @@ Copyright 1997 - July 2008 CWI. - @@ -72,12 +71,13 @@ Copyright 1997 - July 2008 CWI. - + + @@ -91,11 +91,11 @@ Copyright 1997 - July 2008 CWI. + + + - - - @@ -105,8 +105,7 @@ Copyright 1997 - July 2008 CWI. - + @@ -278,11 +277,11 @@ Copyright 1997 - July 2008 CWI. - - - - + + + + diff --git a/build_jre21.xml b/build_jre21.xml --- a/build_jre21.xml +++ b/build_jre21.xml @@ -19,7 +19,6 @@ Copyright 1997 - July 2008 CWI. - @@ -75,12 +74,13 @@ Copyright 1997 - July 2008 CWI. - + + @@ -94,11 +94,11 @@ Copyright 1997 - July 2008 CWI. + + + - - - @@ -108,8 +108,7 @@ Copyright 1997 - July 2008 CWI. - + @@ -281,11 +280,11 @@ Copyright 1997 - July 2008 CWI. - - - - + + + + ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
monetdb-java: default - Approve new output for MonetDriver.getPr...
Changeset: 9c310d692465 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/9c310d692465 Modified Files: tests/JDBC_API_Tester.java Branch: default Log Message: Approve new output for MonetDriver.getPropertyInfo() diffs (56 lines): diff --git a/tests/JDBC_API_Tester.java b/tests/JDBC_API_Tester.java --- a/tests/JDBC_API_Tester.java +++ b/tests/JDBC_API_Tester.java @@ -766,13 +766,46 @@ public final class JDBC_API_Tester { } compareExpectedOutput("Test_Driver", - "0 user true null User loginname to use when authenticating on the database server\n" + - "1 password true null Password to use when authenticating on the database server\n" + + "0 user trueuser name to authenticate as\n" + + "1 password truepassword to authenticate with\n" + + "2 host falseIP number, domain name or one of the special values `localhost` and `localhost.`\n" + + "3 port false -1 Port to connect to, 1..65535 or -1 for 'not set'\n" + + "4 database falsename of database to connect to\n" + + "5 autocommit false true initial value of autocommit\n" + + "6 schema falseinitial schema\n" + + "7 timezone false 60 client time zone as minutes east of UTC\n" + + "8 replysize false 250 rows beyond this limit are retrieved on demand, <1 means unlimited\n" + + "9 debug false false enable tracing of socket communication for debugging\n" + + "10 logfile falsewhen debug is enabled its output will be written to this logfile\n" + + "11 so_timeout false 0 abort if network I/O does not complete in this many milliseconds, 0 means no timeout\n" + + "12 treat_clob_as_varchar false true map CLOB/TEXT data to type VARCHAR instead of type CLOB\n" + + "13 treat_blob_as_binary false true map BLOB data to type BINARY instead of type BLOB\n" + + "14 client_info false true whether to send ClientInfo when connecting\n" + + "15 client_application falseapplication name to send in ClientInfo\n" + + "16 client_remark falseany client remark to send in ClientInfo\n" + "getPropertyInfo of jdbc:monetdbs:\n" + - "0 user true null User loginname to use when authenticating on the database server\n" + - "1 password true null Password to use when authenticating on the database server\n" + - "2 tls true null secure the connection using TLS\n" + - "3 cert true null path to TLS certificate to authenticate server with\n"); + "0 user trueuser name to authenticate as\n" + + "1 password truepassword to authenticate with\n" + + "2 tls false false secure the connection using TLS\n" + + "3 host falseIP number, domain name or one of the special values `localhost` and `localhost.`\n" + + "4 port false -1 Port to connect to, 1..65535 or -1 for 'not set'\n" + + "5 database falsename of database to connect to\n" + + "6 cert falsepath to TLS certificate to authenticate server with\n" + + "7 certhash falsehash of server TLS certificate must start with these hex digits; overrides cert\n" + + "8 clientkey falsepath to TLS key (+certs) to authenticate with as client\n" + + "9 clientcert falsepath to TLS certs for 'clientkey', if not included there\n" + + "10 autocommit false true initial value of autocommit\n" + + "11 schema falseinitial schema\n" + + "12 timezone false 60 client time zone as minutes east of UTC\n" + + "13 replysize false 250 rows beyond this limit are retrieved on demand, <1 means unlimited\n" + + "14 debug false false enable tracing of socket communication for debugging\n" + + "15 logfile falsewhen debug is enabled its output will be written to this logfile\n" + + "16 so_timeout false 0 abort if network I/O does not complete in this many milliseconds, 0 means no timeout\n" + + "17 treat_clob_as_varchar false true map CLOB/TEXT data to type VARCHAR instead of type CLOB\n" + + "18 treat_blob_as_binary false true map BLOB data to type BINARY instead of type BLO