
org.apache.marmotta.kiwi.persistence.h2.statements.properties Maven / Gradle / Ivy
#
# 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.
#
load.version_by_id = SELECT id,creator,createdAt FROM versions WHERE id = ?
load.version_between = SELECT id,creator,createdAt FROM versions WHERE createdAt > ? AND createdAt <= ? ORDER BY createdAt ASC
load.versions = SELECT id,creator,createdAt FROM versions ORDER BY createdAt ASC
load.versions_by_resource = SELECT DISTINCT V.id,V.creator,V.createdAt \
FROM versions V, triples T, ( (SELECT * FROM versions_added) UNION (SELECT * FROM versions_removed) ) AS J \
WHERE (V.id = J.version_id AND J.triple_id = T.id AND t.subject = ?) \
ORDER BY V.createdAt ASC
load.versions_by_resource_between = SELECT DISTINCT V.id,V.creator,V.createdAt \
FROM versions V, triples T, ( (SELECT * FROM versions_added) UNION (SELECT * FROM versions_removed) ) AS J \
WHERE (V.id = J.version_id AND J.triple_id = T.id AND t.subject = ? AND V.createdAt >= ? AND V.createdAt <= ?) \
ORDER BY V.createdAt ASC
load.versions_by_resource_latest = SELECT DISTINCT V.id,V.creator,V.createdAt \
FROM versions V, triples T, ( (SELECT * FROM versions_added) UNION (SELECT * FROM versions_removed) ) AS J \
WHERE (V.id = J.version_id AND J.triple_id = T.id AND t.subject = ? AND V.createdAt <= ?) \
ORDER BY V.createdAt DESC
load.versions_added = SELECT triple_id FROM versions_added WHERE version_id = ?
load.versions_removed = SELECT triple_id FROM versions_removed WHERE version_id = ?
# store version information
store.version = INSERT INTO versions (id,creator,createdAt) VALUES (?,?,?)
store.version_added = INSERT INTO versions_added (version_id,triple_id) VALUES (?,?)
store.version_removed = INSERT INTO versions_removed (version_id,triple_id) VALUES (?,?)
delete.version_added = DELETE FROM versions_added WHERE version_id = ?
delete.version_removed = DELETE FROM versions_removed WHERE version_id = ?
delete.version = DELETE FROM versions WHERE id = ?
© 2015 - 2025 Weber Informatics LLC | Privacy Policy