All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tivemq.artemis-jdbc-store.2.39.0.source-code.journal-sql.properties Maven / Gradle / Ivy

The newest version!
# 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.

# Generic SQL statements

create-file-table=CREATE TABLE %s (ID BIGINT AUTO_INCREMENT, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
create-file-index=CREATE INDEX %1$s_IDX ON %1$s (fileName)
insert-file=INSERT INTO %s (FILENAME, EXTENSION, DATA) VALUES (?,?,?)
select-filenames-by-extension=SELECT FILENAME, ID FROM %s WHERE EXTENSION=?
select-file-by-filename=SELECT ID, FILENAME, EXTENSION FROM %s WHERE fileName=?
append-to-file=SELECT DATA FROM %s WHERE ID=? FOR UPDATE
read-large-object=SELECT DATA FROM %s WHERE ID=?
delete-file=DELETE FROM %s WHERE ID=?
update-filename-by-id=UPDATE %s SET FILENAME=? WHERE ID=?
clone-file-record=INSERT INTO %s (FILENAME, EXTENSION, DATA) (SELECT FILENAME, EXTENSION, DATA FROM %s WHERE ID=?)
copy-file-record-by-id=UPDATE %1$s SET DATA = (SELECT DATA FROM %1$s WHERE ID=?) WHERE ID=?
drop-table=DROP TABLE %s
create-journal-table=CREATE TABLE %s(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize INTEGER,record BLOB,txDataSize INTEGER,txData BLOB,txCheckNoRecords INTEGER,seq BIGINT NOT NULL, PRIMARY KEY(seq))
create-journal-index=CREATE INDEX %1$s_IDX ON %1$s (id)
create-journal-tx-index=CREATE INDEX %1$s_TX_IDX ON %1$s (txId)
insert-journal-record=INSERT INTO %s(id,recordType,compactCount,txId,userRecordType,variableSize,record,txDataSize,txData,txCheckNoRecords,seq) VALUES (?,?,?,?,?,?,?,?,?,?,?)
select-journal-record=SELECT id,recordType,compactCount,txId,userRecordType,variableSize,record,txDataSize,txData,txCheckNoRecords,seq FROM %s ORDER BY seq ASC
delete-journal-record=DELETE FROM %s WHERE id = ?
delete-journal-tx-record=DELETE FROM %s WHERE txId=?
count-journal-record=SELECT COUNT(*) FROM %s

create-node-manager-store-table=CREATE TABLE %s (ID INT NOT NULL, HOLDER_ID VARCHAR(128), HOLDER_EXPIRATION_TIME BIGINT, NODE_ID CHAR(36),STATE CHAR(1), PRIMARY KEY(ID))
create-state=INSERT INTO %s (ID) VALUES (%s)
try-acquire-lock=UPDATE %s SET HOLDER_ID = ?, HOLDER_EXPIRATION_TIME = ? WHERE (HOLDER_EXPIRATION_TIME IS NULL OR HOLDER_EXPIRATION_TIME < ?) AND ID = %s
try-release-lock=UPDATE %s SET HOLDER_ID = NULL, HOLDER_EXPIRATION_TIME = NULL WHERE HOLDER_ID = ? AND ID = %s
is-locked=SELECT HOLDER_ID, HOLDER_EXPIRATION_TIME FROM %s WHERE ID = %s
renew-lock=UPDATE %s SET HOLDER_EXPIRATION_TIME = ? WHERE HOLDER_ID = ? AND HOLDER_EXPIRATION_TIME IS NOT NULL AND ? >= HOLDER_EXPIRATION_TIME AND ID = %s
current-timestamp=SELECT CURRENT_TIMESTAMP FROM %s
write-state=UPDATE %s SET STATE = ? WHERE ID = %s
read-state=SELECT STATE FROM %s WHERE ID = %s
write-nodeId=UPDATE %s SET NODE_ID = ? WHERE ID = %s
read-nodeId=SELECT NODE_ID FROM %s WHERE ID = %s
initialize-nodeId=UPDATE %s SET NODE_ID = ? WHERE NODE_ID IS NULL AND ID = %s

# in KiB
max-blob-size=64512
close-connection-on-shutdown=true
# none|lower|upper
table-names-case=none

# Derby SQL statements
close-connection-on-shutdown.derby=false
create-file-table.derby=CREATE TABLE %s (ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
max-blob-size.derby=2147483647
table-names-case.derby=upper

# PostgreSQL SQL statements
create-file-table.postgresql=CREATE TABLE %s (ID BIGSERIAL, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA OID, PRIMARY KEY(ID))
create-journal-table.postgresql=CREATE TABLE %s(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize INTEGER,record BYTEA,txDataSize INTEGER,txData BYTEA,txCheckNoRecords INTEGER,seq BIGINT)
current-timestamp.postgresql=SELECT NOW() AT TIME ZONE 'UTC'
current-timestamp-timezone-id.postgresql=UTC

# 1 GiB
max-blob-size.postgresql=1073741824
table-names-case.postgresql=lower

# MySQL SQL statements
create-file-table.mysql=CREATE TABLE %s(ID BIGINT NOT NULL AUTO_INCREMENT, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA LONGBLOB, PRIMARY KEY(ID)) ENGINE=InnoDB
append-to-file.mysql=SELECT DATA, ID FROM %s WHERE ID=? FOR UPDATE
create-journal-table.mysql=CREATE TABLE %s(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize INTEGER,record LONGBLOB,txDataSize INTEGER,txData LONGBLOB,txCheckNoRecords INTEGER,seq BIGINT) ENGINE=InnoDB
copy-file-record-by-id.mysql=UPDATE %1$s, (SELECT DATA AS FROM_DATA FROM %1$s WHERE id=?) SELECT_COPY SET DATA=FROM_DATA WHERE id=?
current-timestamp.mysql=SELECT UTC_TIMESTAMP(6)
current-timestamp-timezone-id.mysql=UTC
# 4 GiB
max-blob-size.mysql=4294967296
table-names-case.mysql=lower

# Oracle SQL statements
create-file-table.oracle=CREATE TABLE %s(ID NUMBER(19) GENERATED BY DEFAULT ON NULL AS IDENTITY, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
create-journal-table.oracle=CREATE TABLE %s(id NUMBER(19),recordType NUMBER(5),compactCount NUMBER(5),txId NUMBER(19),userRecordType NUMBER(5),variableSize NUMBER(10),record BLOB,txDataSize NUMBER(10),txData BLOB,txCheckNoRecords NUMBER(10),seq NUMBER(19))
create-node-manager-store-table.oracle=CREATE TABLE %s (ID INT NOT NULL, HOLDER_ID VARCHAR(128), HOLDER_EXPIRATION_TIME NUMBER(19), NODE_ID CHAR(36),STATE CHAR(1), PRIMARY KEY(ID))
current-timestamp.oracle=SELECT SYSTIMESTAMP AT TIME ZONE 'UTC' FROM DUAL
current-timestamp-timezone-id.oracle=UTC
# 4 GiB
max-blob-size.oracle=4294967296
table-names-case.oracle=upper

# DB2 SQL statements
create-journal-table.db2=CREATE TABLE %s(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize INTEGER,record BLOB(2G),txDataSize INTEGER,txData BLOB(2G),txCheckNoRecords INTEGER,seq BIGINT NOT NULL, PRIMARY KEY(seq))
max-blob-size.db2=2147483647
create-file-table.db2=CREATE TABLE %s (ID BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1), FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB(2G), PRIMARY KEY(ID))
replace-file.db2=UPDATE %s SET DATA=? WHERE ID=?
append-to-file.db2=UPDATE %s SET DATA = (DATA || ?) WHERE ID=?
table-names-case.db2=upper
current-timestamp.db2=SELECT CURRENT TIMESTAMP - CURRENT TIMEZONE FROM SYSIBM.SYSDUMMY1
current-timestamp-timezone-id.db2=UTC

# MSSQL SQL statements
create-file-table.mssql=CREATE TABLE %s (ID BIGINT NOT NULL IDENTITY, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA VARBINARY(max), PRIMARY KEY(ID))
create-journal-table.mssql=CREATE TABLE %s(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize INTEGER,record VARBINARY(max),txDataSize INTEGER,txData VARBINARY(max),txCheckNoRecords INTEGER,seq BIGINT NOT NULL, PRIMARY KEY(seq))
create-node-manager-store-table.mssql=CREATE TABLE %s (ID INT NOT NULL, HOLDER_ID VARCHAR(128), HOLDER_EXPIRATION_TIME BIGINT, NODE_ID CHAR(36),STATE CHAR(1), PRIMARY KEY(ID))
current-timestamp.mssql=SELECT SYSUTCDATETIME()
current-timestamp-timezone-id.mssql=UTC
max-blob-size.mssql=2147483647




© 2015 - 2025 Weber Informatics LLC | Privacy Policy