### Start WsgiDAV Server for Testing Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md Example command to install and run a WsgiDAV server for testing purposes. This server will be used as the WebDAV backend. ```bash wsgidav --host=0.0.0.0 --port=8888 --root=/tmp/davroot ``` -------------------------------- ### Execute PROPFIND WebDAV Request Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-webdav/src/main/javadoc/org/apache/jackrabbit/webdav/client/methods/package.html Instantiate and execute a WebDAV method, such as PropFindMethod, for a specific resource. This example uses PROPFIND_ALL_PROP and DEPTH_1. ```java String propfindUri = "http://your-webdav-server/anyresource"; DavMethod method = new PropFindMethod(propfindUri, DavConstants.PROPFIND_ALL_PROP, DavConstants.DEPTH_1); client.executeMethod(method); ``` -------------------------------- ### SQL2 Prefix Notation Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Use prefix notation for qualified names, typically for namespaces. Supports standard and custom prefixes. ```sql select * from test where name=$nt:name ``` ```sql select * from test where name=$_:name ``` ```sql select * from test where name=$_1:name ``` -------------------------------- ### SameNodeJoinCondition Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates the use of issamenode() in join conditions. ```sql select * from parent as p inner join child as c on issamenode(p, c) ``` ```sql select * from parent as p inner join child as c on issamenode(p, c, a) ``` ```sql select * from parent as p inner join child as c on issamenode(p, c, [/a/b/c]) ``` ```sql select * from parent as p inner join child as c on issamenode(p, c, ['/a/b/c']) ``` -------------------------------- ### Enable Profiler with JVM Agent Source: https://github.com/apache/jackrabbit/blob/trunk/test/performance/README.txt Attach a Java profiler to the JVM using the -Dagentlib parameter. This example configures the hprof profiler for CPU sampling with a specified depth. ```bash mvn clean install -Dagentlib=hprof=cpu=samples,depth=10 ``` -------------------------------- ### SQL2 Bind Variable Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Use bind variables for dynamic query parameters, denoted by a '$' prefix followed by the variable name. ```sql select * from test where name=$name ``` ```sql select * from test where name=$x and id=$y ``` ```sql select * from test where name=$x14 ``` ```sql select * from test where name=$_ ``` -------------------------------- ### ChildNodeJoinCondition Example Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows the use of ischildnode() in a join condition. ```sql select * from parent as p inner join child as c on ischildnode(p, c) ``` -------------------------------- ### SQL2 Literal Value Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates various literal types including numbers (integers, decimals, scientific notation), booleans, strings, and type casting. ```sql select * from test where amount=0.01 ``` ```sql select * from test where amount=10. ``` ```sql select * from test where amount=.01 ``` ```sql select * from test where amount=.01e-1 ``` ```sql select * from test where amount=-.01e1 ``` ```sql select * from test where amount=-0.01e1 ``` ```sql select * from test where amount=+10 ``` ```sql select * from test where amount=-10e10 ``` ```sql select * from test where amount=+10e-10 ``` ```sql select * from test where amount=+10e+10 ``` ```sql select * from test where active=true ``` ```sql select * from test where active=false ``` ```sql select * from test where name='test''test' ``` ```sql select * from test where name=''''' ``` ```sql select * from test where active="True" ``` ```sql select * from test where active="" ``` ```sql select * from test where a=cast('0.01' as string) ``` ```sql select * from test where a=cast('abcdef' as binary) ``` ```sql select * from test where a=cast('+2001-01-01T01:02:03.000Z' as date) ``` ```sql select * from test where a=cast('10' as long) ``` ```sql select * from test where a=cast('100.5' as double) ``` ```sql select * from test where a=cast('3.11' as decimal) ``` ```sql select * from test where a=cast('true' as boolean) ``` ```sql select * from test where a=cast('firstName' as name) ``` ```sql select * from test where a=cast('a/b/c' as path) ``` ```sql select * from test where a=cast('[123]' as reference) ``` ```sql select * from test where a=cast('[123]' as weakreference) ``` ```sql select * from test where a=cast("x://y/z" as uri) ``` -------------------------------- ### SQL2 Ordering Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Specify the order of results using the ORDER BY clause. Supports ascending (asc) and descending (desc) order, and multiple sort keys. ```sql select * from test order by name ``` ```sql select * from test order by name asc ``` ```sql select * from test order by name desc ``` ```sql select * from test order by id, name ``` ```sql select * from test order by id, name, id, name ``` ```sql select * from test order by id desc, name asc, id, name desc ``` ```sql select * from test order by id desc, name asc, id asc ``` -------------------------------- ### DescendantNodeJoinCondition Example Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates the use of isdescendantnode() in a join condition. ```sql select * from parent as p inner join child as c on isdescendantnode(p, c) ``` -------------------------------- ### Complex Join with Multiple Conditions Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt An example of a complex join involving multiple tables and conditions. ```sql select * from parent as p right outer join child as c on p.id=c.parentid inner join other as x on p.id = x.id ``` -------------------------------- ### SQL2 JOIN with issamenode Function Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Example of an INNER JOIN using the issamenode function. Note the syntax error indicated in the provided exception. ```sql select * from parent as p inner join child as c on issamenode(p, c, a/b) ``` -------------------------------- ### SQL2 Case Conversion Function Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Use lower() and upper() functions for case-insensitive comparisons. These can be nested and applied to various property types. ```sql select * from test where lower(name)='test' ``` ```sql select * from test where lower(upper(name))='test' ``` ```sql select * from test where lower(localname(test))='test' ``` ```sql select * from test where lower(name(test))='test' ``` ```sql select * from test as x where lower(x.name)='test' ``` ```sql select * from test where upper(name)='test' ``` ```sql select * from test where upper(lower(name))='test' ``` ```sql select * from test where upper(localname(test))='test' ``` ```sql select * from test where upper(name(test))='test' ``` ```sql select * from test as x where upper(x.name)='test' ``` -------------------------------- ### SQL2 NodeName Function Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Filter nodes based on their node name using the name() function. Aliasing is supported. ```sql select * from test where name()='test' ``` ```sql select * from test as x where name(x)='test' ``` -------------------------------- ### SQL2 NodeLocalName Function Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Filter nodes based on their local name using the localname() function. Aliasing is supported. ```sql select * from test where localname()='test' ``` ```sql select * from test as x where localname(x)='test' ``` -------------------------------- ### SQL2 FullTextSearchScore Function Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Use the score() function to filter results based on full-text search relevance. Supports aliasing. ```sql select * from test where score()>4 ``` ```sql select * from test as x where score(x)<1 ``` -------------------------------- ### SQL2 Length Function Examples Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Use the length function to filter results based on the length of a string property. Supports aliasing for tables and properties. ```sql select * from test where length(name)=5 ``` ```sql select * from test as t where length(t.name)=5 ``` ```sql select * from test as t where length(name)=5 ``` ```sql SELECT * FROM [my:thing] WHERE [my:property] = 'abc' ``` ```sql SELECT * FROM [my:thing] AS thing WHERE [my:property] = 'abc' ``` ```sql SELECT * FROM [my:thing] AS [thing] WHERE [thing].[my:property] = 'abc' ``` -------------------------------- ### SQL2 Incomplete SELECT Statement Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt A basic example of an incomplete SELECT statement that will result in a parsing error. This highlights the need for a complete FROM clause. ```sql select * from ``` -------------------------------- ### Generate HTML Report Source: https://github.com/apache/jackrabbit/blob/trunk/test/performance/README.txt Combine raw test results into an HTML report using the plot.sh script. This requires gnuplot to be installed on a Unix-like system. ```bash sh plot.sh ``` -------------------------------- ### SQL2 JOIN with Ambiguous Column Name Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt An example of a JOIN query where a column name is ambiguous because it exists in multiple tables without a specified selector. This requires qualifying the column name with its selector. ```sql select id from parent inner join child on parent.id=child.parentid ``` -------------------------------- ### Configure HTTP Client with Credentials Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-webdav/src/main/javadoc/org/apache/jackrabbit/webdav/client/methods/package.html Create an HttpClient instance, associate it with the configured connection manager and host configuration. Set up basic authentication credentials. ```java HttpClient client = new HttpClient(connectionManager); client.setHostConfiguration(hostConfig); Credentials creds = new UsernamePasswordCredentials("userId", "pw"); client.getState().setCredentials(AuthScope.ANY, creds); ``` -------------------------------- ### Run Unit Tests with Default Local File System Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md Execute unit tests using the local file system as the default backend storage. ```bash mvn clean test ``` -------------------------------- ### Run Unit Tests with SFTP File System Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md Configure and run unit tests with an SFTP backend file system. Ensure an SFTP server is accessible. ```bash mvn clean test -Dconfig=src/test/resources/vfs-sftp.properties ``` -------------------------------- ### Run Unit Tests with WebDAV File System Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md Configure and run unit tests with a WebDAV backend file system. Ensure a WebDAV server is running. ```bash mvn clean test -Dconfig=src/test/resources/vfs-webdav.properties ``` -------------------------------- ### Basic SELECT Statements Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates basic SELECT statements without any clauses. ```sql select * from test ``` ```sql SELECT * FROM TEST ``` ```sql SeLeCt * FrOm test ``` -------------------------------- ### Test Against All Repository Configurations Source: https://github.com/apache/jackrabbit/blob/trunk/test/performance/README.txt Execute performance tests against all included repository configurations by using a wildcard with the -Drepo parameter. ```bash mvn clean install -Drepo=.* ``` -------------------------------- ### Test Against Default Repository Versions Source: https://github.com/apache/jackrabbit/blob/trunk/test/performance/README.txt Run performance tests against the default official release versions of the repository using a regular expression with the -Drepo parameter. ```bash mvn clean install -Drepo=\d\.\d ``` -------------------------------- ### Basic SELECT Statements in SQL2 Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates fundamental SELECT statements for retrieving columns from a table. Use these for simple data extraction. ```sql select name from test ``` ```sql select id, name from test ``` -------------------------------- ### Build Jackrabbit with Maven Source: https://github.com/apache/jackrabbit/blob/trunk/README.txt Use this command to build the Jackrabbit project. Requires Maven 3+ and Java 11+. ```bash mvn clean install ``` -------------------------------- ### Property Existence Checks Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates checking for the existence or non-existence of properties using IS NOT NULL and IS NULL. ```sql select * from test where name is not null ``` ```sql select * from test as t where t.name is not null and t.id<>0 ``` ```sql select * from test as t where not t.name is not null ``` ```sql select * from test as t where t.name is null ``` ```sql select * from test as t where not t.name is null ``` -------------------------------- ### Basic SELECT Statement Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates a simple SELECT statement with a WHERE clause using a parameter. ```sql select * from test where name=$nt:name ``` -------------------------------- ### SELECT with Aliases and Quoted Names Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates using aliases for table names and quoting names. ```sql select * from test as t ``` ```sql select * from ["Test"] ``` ```sql select * from [test] ``` ```sql select * from [test] as [t] ``` ```sql select * from test as ["t"] ``` ```sql select * from ["test"] as ["t"] ``` -------------------------------- ### SELECT with WHERE and ORDER BY Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows SELECT statements with WHERE clauses and ORDER BY clauses. ```sql select * from test where id=1 ``` ```sql select * from test where id=1 order by id ``` ```sql select * from test order by id ``` -------------------------------- ### Configure WebDAV Server URI Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-webdav/src/main/javadoc/org/apache/jackrabbit/webdav/client/methods/package.html Define the URI pointing to your WebDAV enabled server. This is a prerequisite for setting up the HostConfiguration. ```java String uri = "http://your-webdav-server"; HostConfiguration hostConfig = new HostConfiguration(); hostConfig.setHost(uri); ``` -------------------------------- ### Session Creation Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-core/src/main/javadoc/org/apache/jackrabbit/core/package.html A SessionImpl instance is created upon successfully logging into the Repository. ```APIDOC ## Session Creation ### Description Creates a new session instance by logging into a repository. ### Method `Session login(Credentials credentials, String workspaceName)` ### Parameters * **credentials** (`Credentials`) - The credentials for login. * **workspaceName** (`String`) - The name of the workspace to log into. ### Returns * `Session` - A new session instance. ``` -------------------------------- ### Configure VFSDataStore with WebDAV File System Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md XML configuration for VFSDataStore using a WebDAV file system. Requires a properties file for VFS options. ```xml ``` -------------------------------- ### SQL2 SELECT with Table Aliases Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates how to use aliases for table names in SELECT statements. This is useful for brevity and clarity, especially in complex queries. ```sql select x.id from test as x ``` ```sql select x.id, name from test as x ``` -------------------------------- ### Repository Creation Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-core/src/main/javadoc/org/apache/jackrabbit/core/package.html A Jackrabbit repository instance can be created using the static RepositoryImpl.create(RepositoryConfig) method. ```APIDOC ## Repository Creation ### Description Creates a new Jackrabbit repository instance. ### Method `static Repository create(RepositoryConfig config)` ### Parameters * **config** (`RepositoryConfig`) - The configuration for the repository. ### Returns * `Repository` - A new instance of the Jackrabbit repository. ``` -------------------------------- ### Configure HTTP Connection Manager Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-webdav/src/main/javadoc/org/apache/jackrabbit/webdav/client/methods/package.html Set up an HttpConnectionManager, responsible for managing HTTP connections and supporting multithreading. Configure connection limits per host. ```java HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager(); HttpConnectionManagerParams params = new HttpConnectionManagerParams(); int maxHostConnections = 20; params.setMaxConnectionsPerHost(hostConfig, maxHostConnections); connectionManager.setParams(params); ``` -------------------------------- ### Configure S3 Datastore in Jackrabbit Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-aws-ext/README.txt Configure the S3 Datastore by specifying the class and providing the path to the 'aws.properties' configuration file. ```xml ``` -------------------------------- ### SQL2 JOIN with issamenode Function (Incorrect Arguments) Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates an INNER JOIN with the issamenode function, highlighting an incorrect usage pattern that leads to an exception. ```sql select * from parent as p inner join child as c on issamenode(p, c, d, e) ``` -------------------------------- ### Build and Test Jackrabbit AWS Extension with S3 Config Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-aws-ext/README.txt To run test cases that store data in an S3 bucket, pass the AWS configuration file path via the system property '-Dconfig'. ```bash mvn clean install -DargLine="-Dconfig=/opt/cq/aws.properties" ``` -------------------------------- ### Configure VFSDataStore with Local File System Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md XML configuration for VFSDataStore using the local file system. Specifies base folder and asynchronous write pool size. ```xml ``` -------------------------------- ### Run All Concurrency Tests Source: https://github.com/apache/jackrabbit/blob/trunk/test/performance/README.txt Execute all performance tests related to concurrency by using a wildcard in the -Donly parameter. This helps in assessing the performance of concurrent operations. ```bash mvn clean install -Donly=Concurrent.*Test ``` -------------------------------- ### SQL2 JOIN with isdescendantnode Function (Multiple Arguments) Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates the use of the isdescendantnode function with multiple arguments, highlighting a syntax error related to the argument list. ```sql select * from parent as p inner join child as c on isdescendantnode(a, b, c) ``` -------------------------------- ### SQL2 SELECT with Column Aliases Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows how to assign aliases to selected columns. This is helpful for renaming columns in the result set for better readability or to avoid naming conflicts. ```sql select x.id as i from test as x inner join test as y on x.id=y.id ``` ```sql select x.id as i, y.name as n from test as x inner join test as y on x.id=y.id ``` ```sql select x.id, y.name as n from test as x inner join test as y on x.id=y.id ``` -------------------------------- ### SQL2 SELECT with Wildcard and Aliases Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates selecting all columns from aliased tables using the wildcard (*). This is useful for retrieving all data from specific tables in a join. ```sql select x.* from test as x ``` ```sql select x.*, y.* from test as x inner join test as y on x.id=y.id ``` ```sql select x.*, x.id as i, y.*, y.name from test as x inner join test as y on x.id=y.id ``` -------------------------------- ### Nested AND and OR Constraints Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates complex WHERE clauses with nested AND and OR operators. ```sql select * from test where id<1 and (id>1 or id<2) ``` ```sql select * from test where (id<1 and id>1) or id<2 ``` ```sql select * from test where id<1 and id>1 or id<2 ``` ```sql select * from test where (id<1 or id>1) and id<2 ``` ```sql select * from test where id<1 or (id>1 and id<2) ``` ```sql select * from test where id<1 or id>1 and id<2 ``` -------------------------------- ### SFTP VFS2 DataStore Properties Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md Configuration properties for connecting to an SFTP file system using VFS2. Includes base URI and file system options. ```properties baseFolderUri = sftp://tester:secret@localhost/vfsds # Properties to build org.apache.commons.vfs2.FileSystemOptions at runtime when resolving the base folder. # Any properties, name of which is starting with 'fso.', are used to build FileSystemOptions # after removing the 'fso.' prefix. See VFS2 documentation for the detail. ``` -------------------------------- ### Retrieve PROPFIND Response Body Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-webdav/src/main/javadoc/org/apache/jackrabbit/webdav/client/methods/package.html After a successful WebDAV request, retrieve the response body in a structured format. For PROPFIND, this is typically a MultiStatus object. ```java MultiStatus multiStatus = method.getResponseBodyAsMultiStatus(); ``` -------------------------------- ### Comparison Operators Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows various comparison operators including less than or equal to, greater than or equal to, not equal to, and like. ```sql select * from test where id<=2 or id>=3 and name<'a' or name>'c' ``` ```sql select * from test where id<>2 ``` ```sql select * from [test] where [id]<>2 ``` ```sql select * from test where name like 'H%' ``` -------------------------------- ### WebDAV VFS2 DataStore Properties Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-vfs-ext/README.md Configuration properties for connecting to a WebDAV file system using VFS2. Includes base URI and file system options. ```properties baseFolderUri = webdav://tester:secret@localhost:8888/vfsds # Properties to build org.apache.commons.vfs2.FileSystemOptions at runtime when resolving the base folder. # Any properties, name of which is starting with 'fso.', are used to build FileSystemOptions # after removing the 'fso.' prefix. See VFS2 documentation for the detail. fso.http.maxTotalConnections = 200 fso.http.maxConnectionsPerHost = 200 fso.http.preemptiveAuth = false ``` -------------------------------- ### SameNode Function Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates using the issamenode() function to check if nodes are the same. ```sql select * from test where issamenode([/a/b/c]) ``` ```sql select * from test as a where issamenode(['/a']) ``` ```sql select * from test as x where issamenode(x, ['/a[2]/b/c']) ``` -------------------------------- ### AND Constraint Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates the use of the AND operator in a WHERE clause. ```sql select * from test where id<1 and id>1 ``` -------------------------------- ### Run a Single Performance Test Source: https://github.com/apache/jackrabbit/blob/trunk/test/performance/README.txt Specify a single performance test case to run using the -Donly parameter with a regular expression. This is useful for debugging or focusing on a specific test. ```bash mvn clean install -Donly=ConcurrentReadTest ``` -------------------------------- ### Full-Text Search Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows how to perform full-text searches using the CONTAINS function. ```sql select * from test where contains(name, 'hello -world') ``` ```sql select * from test where contains(name, $x) ``` ```sql select * from test as t where contains(t.*, 'hello -world') ``` ```sql select * from test as t where contains([t].name, 'hello -world') ``` -------------------------------- ### INNER JOIN Clause Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates an INNER JOIN between two tables with an ON clause specifying equality. ```sql select * from parent inner join child on parent.id=child.parentid ``` ```sql select * from parent as p inner join child as c on p.id=c.parentid ``` ```sql select * from parent as p inner join child as c on p.id=c.parentid ``` -------------------------------- ### SQL2 JOIN with ischildnode Function Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates an INNER JOIN using the ischildnode function. The provided error indicates a syntax issue with the function's arguments. ```sql select * from parent as p inner join child as c on ischildnode(p, c, a) ``` -------------------------------- ### NOT Constraint Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates the use of the NOT operator to negate conditions. ```sql select * from test where not id=2 ``` ```sql select * from test where not (id=2 and name='Hello') ``` ```sql select * from test where not ([id]=2 and [name]='Hello') ``` ```sql select * from test where id=2 or not (name='Hello' and id=3) ``` ```sql select * from test where (not name='Hello') and id=3 ``` ```sql select * from test where id = 3 and (not name='Hello') ``` -------------------------------- ### ChildNode Function Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows how to use the ischildnode() function to check if a node is a child of another. ```sql select * from test where ischildnode([/a[1]/b]) ``` ```sql select * from test as a where ischildnode(['/a']) ``` ```sql select * from test as x where ischildnode(x, [/]) ``` ```sql select * from test as x where ischildnode(x, ['/a[1]']) ``` -------------------------------- ### OR Constraint Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows the use of the OR operator in a WHERE clause. ```sql select * from test where id=2 or name='Hello' ``` -------------------------------- ### RIGHT OUTER JOIN Clause Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Demonstrates a RIGHT OUTER JOIN between two tables with an ON clause specifying equality. ```sql select * from parent as p right outer join child as c on p.id=c.parentid ``` -------------------------------- ### SQL2 JOIN with isdescendantnode Function (Incorrect Usage) Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows an INNER JOIN with the isdescendantnode function, where the syntax error points to an issue with the argument list. ```sql select * from parent as p inner join child as c on isdescendantnode(p) ``` -------------------------------- ### DescendantNode Function Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Illustrates the use of the ISDESCENDANTNODE() function to check for descendant relationships. ```sql select * from test where ISDESCENDANTNODE([/a[1]]) ``` ```sql select * from test as a where ISDESCENDANTNODE([/a]) ``` ```sql select * from test as x where ISDESCENDANTNODE(x, [/a/b/c]) ``` -------------------------------- ### Check WebDAV Method Success Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-webdav/src/main/javadoc/org/apache/jackrabbit/webdav/client/methods/package.html Utilize DavMethod's built-in methods to check if a WebDAV request was executed successfully without manually parsing status codes. ```java method.checkSuccess(); ``` -------------------------------- ### LEFT OUTER JOIN Clause Source: https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt Shows a LEFT OUTER JOIN between two tables with an ON clause specifying equality. ```sql select * from parent as p left outer join child as c on p.id=c.parentid ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.