diff --git a/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/cubrid.ddl b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/cubrid.ddl new file mode 100644 index 00000000000..6654cf44423 --- /dev/null +++ b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/cubrid.ddl @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar(2048) not null, FSENTRY_NAME varchar(255) not null, FSENTRY_DATA blob null, FSENTRY_LASTMOD numeric(38,0) not null, FSENTRY_LENGTH numeric(38,0) null) +create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH, FSENTRY_NAME) diff --git a/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/cubrid.ddl b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/cubrid.ddl new file mode 100644 index 00000000000..dfb97c042f0 --- /dev/null +++ b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/cubrid.ddl @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +create table ${schemaObjectPrefix}JOURNAL (REVISION_ID numeric(20,0) NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA blob) +create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID) + +create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID numeric(20,0) NOT NULL) +create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID) + +create table ${schemaObjectPrefix}LOCAL_REVISIONS (JOURNAL_ID varchar(255) NOT NULL, REVISION_ID numeric(20,0) NOT NULL) + +# Inserting the one and only revision counter record now helps avoiding race conditions +insert into ${schemaObjectPrefix}GLOBAL_REVISION VALUES(0) diff --git a/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/cubrid.ddl b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/cubrid.ddl new file mode 100644 index 00000000000..8623fb9978e --- /dev/null +++ b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/cubrid.ddl @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +create table ${schemaObjectPrefix}BUNDLE (NODE_ID bit(128) not null, BUNDLE_DATA blob) +create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID) + +create table ${schemaObjectPrefix}REFS (NODE_ID bit(128) not null, REFS_DATA blob) +create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) + +create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(64) not null, BINVAL_DATA blob null) +create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) + +create table ${schemaObjectPrefix}NAMES (ID int auto_increment primary key, NAME varchar(255) not null) diff --git a/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/cubrid.ddl b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/cubrid.ddl new file mode 100644 index 00000000000..b3961580c8d --- /dev/null +++ b/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/cubrid.ddl @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null, NODE_DATA blob) +create unique index ${schemaObjectPrefix}NODE_IDX on ${schemaObjectPrefix}NODE (NODE_ID) +create table ${schemaObjectPrefix}PROP (PROP_ID varchar(1024) not null, PROP_DATA blob) +create unique index ${schemaObjectPrefix}PROP_IDX on ${schemaObjectPrefix}PROP (PROP_ID) +create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA blob) +create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) +create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(1024) not null, BINVAL_DATA blob null) +create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) diff --git a/jackrabbit-data/src/main/resources/org/apache/jackrabbit/core/data/db/cubrid.properties b/jackrabbit-data/src/main/resources/org/apache/jackrabbit/core/data/db/cubrid.properties new file mode 100644 index 00000000000..0f67cb0d982 --- /dev/null +++ b/jackrabbit-data/src/main/resources/org/apache/jackrabbit/core/data/db/cubrid.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Tested with Cubrid Database 11.2 on Windows 11 Pro (2023-04-19) +driver=cubrid.jdbc.driver.CUBRIDDriver +createTable=CREATE TABLE ${tablePrefix}${table}(ID VARCHAR(255) PRIMARY KEY, LENGTH bigint, LAST_MODIFIED bigint, "DATA" blob) +updateData=UPDATE ${tablePrefix}${table} SET "DATA"=? WHERE ID=? +selectData=SELECT ID, "DATA" FROM ${tablePrefix}${table} WHERE ID=? \ No newline at end of file