org.opencms.db.mysql.query.properties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opencms-test Show documentation
Show all versions of opencms-test Show documentation
OpenCms is an enterprise-ready, easy to use website content management system based on Java and XML technology. Offering a complete set of features, OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.
#
# The pattern _${PROJECT}_ in table names is replaced by the SqlManager with
# "_ONLINE_" or "_OFFLINE_" to choose the right database tables for
# SQL queries that are project dependent!
#
# mySQL specific because of the row limitation
C_PROJECTS_HISTORY_READ_ALL=\
SELECT \
PUBLISH_TAG,\
PROJECT_ID,\
PROJECT_NAME,\
PROJECT_PUBLISHDATE,\
PROJECT_PUBLISHED_BY,\
PROJECT_DESCRIPTION,\
USER_ID,\
GROUP_ID,\
MANAGERGROUP_ID,\
DATE_CREATED,\
PROJECT_TYPE,\
PROJECT_OU \
FROM \
CMS_HISTORY_PROJECTS \
ORDER BY \
PUBLISH_TAG DESC \
LIMIT ?
C_RESOURCES_READ_PARENT_BY_ID=\
SELECT \
CMS_${PROJECT}_STRUCTURE.STRUCTURE_ID,\
CMS_${PROJECT}_STRUCTURE.RESOURCE_ID,\
CMS_${PROJECT}_STRUCTURE.RESOURCE_PATH,\
CMS_${PROJECT}_STRUCTURE.STRUCTURE_STATE,\
CMS_${PROJECT}_STRUCTURE.DATE_RELEASED,\
CMS_${PROJECT}_STRUCTURE.DATE_EXPIRED,\
CMS_${PROJECT}_STRUCTURE.STRUCTURE_VERSION,\
CMS_${PROJECT}_RESOURCES.RESOURCE_ID,\
CMS_${PROJECT}_RESOURCES.RESOURCE_TYPE,\
CMS_${PROJECT}_RESOURCES.RESOURCE_FLAGS,\
CMS_${PROJECT}_RESOURCES.RESOURCE_STATE,\
CMS_${PROJECT}_RESOURCES.DATE_CREATED,\
CMS_${PROJECT}_RESOURCES.DATE_LASTMODIFIED,\
CMS_${PROJECT}_RESOURCES.USER_CREATED,\
CMS_${PROJECT}_RESOURCES.USER_LASTMODIFIED,\
CMS_${PROJECT}_RESOURCES.PROJECT_LASTMODIFIED AS LOCKED_IN_PROJECT,\
CMS_${PROJECT}_RESOURCES.RESOURCE_SIZE,\
CMS_${PROJECT}_RESOURCES.DATE_CONTENT,\
CMS_${PROJECT}_RESOURCES.SIBLING_COUNT,\
CMS_${PROJECT}_RESOURCES.RESOURCE_VERSION,\
CMS_${PROJECT}_RESOURCES.PROJECT_LASTMODIFIED \
FROM \
CMS_${PROJECT}_STRUCTURE,CMS_${PROJECT}_RESOURCES, \
CMS_${PROJECT}_STRUCTURE STR2 \
WHERE \
STR2.STRUCTURE_ID=? \
AND CMS_${PROJECT}_STRUCTURE.STRUCTURE_ID=STR2.PARENT_ID \
AND CMS_${PROJECT}_STRUCTURE.RESOURCE_ID=CMS_${PROJECT}_RESOURCES.RESOURCE_ID
C_RELATIONS_REPAIR_BROKEN=\
UPDATE \
CMS_${PROJECT}_RESOURCE_RELATIONS \
LEFT JOIN \
CMS_${PROJECT}_STRUCTURE ON CMS_${PROJECT}_RESOURCE_RELATIONS.RELATION_TARGET_ID = CMS_${PROJECT}_STRUCTURE.STRUCTURE_ID \
SET \
RELATION_TARGET_ID = ? \
WHERE \
CMS_${PROJECT}_RESOURCE_RELATIONS.RELATION_TARGET_PATH = ? \
AND CMS_${PROJECT}_STRUCTURE.STRUCTURE_ID IS NULL
C_RELATIONS_UPDATE_BROKEN=\
UPDATE \
CMS_${PROJECT}_RESOURCE_RELATIONS \
LEFT JOIN \
CMS_${PROJECT}_STRUCTURE ON CMS_${PROJECT}_RESOURCE_RELATIONS.RELATION_TARGET_ID = CMS_${PROJECT}_STRUCTURE.STRUCTURE_ID \
SET \
RELATION_TARGET_ID = '00000000-0000-0000-0000-000000000000' \
WHERE \
CMS_${PROJECT}_RESOURCE_RELATIONS.RELATION_TARGET_PATH = ? \
AND CMS_${PROJECT}_STRUCTURE.STRUCTURE_ID IS NULL
C_STRUCTURE_HISTORY_READ_NOTDELETED=\
SELECT \
CMS_HISTORY_STRUCTURE.STRUCTURE_ID, MAX(CMS_HISTORY_STRUCTURE.VERSION) \
FROM \
CMS_HISTORY_STRUCTURE \
LEFT JOIN \
CMS_ONLINE_STRUCTURE ON CMS_HISTORY_STRUCTURE.STRUCTURE_ID = CMS_ONLINE_STRUCTURE.STRUCTURE_ID \
WHERE \
CMS_ONLINE_STRUCTURE.STRUCTURE_ID IS NOT NULL \
GROUP BY \
CMS_HISTORY_STRUCTURE.STRUCTURE_ID
C_STRUCTURE_HISTORY_READ_DELETED=\
SELECT \
CMS_HISTORY_STRUCTURE.STRUCTURE_ID, MAX(CMS_HISTORY_STRUCTURE.VERSION) \
FROM \
CMS_HISTORY_STRUCTURE \
LEFT JOIN \
CMS_ONLINE_STRUCTURE ON CMS_HISTORY_STRUCTURE.STRUCTURE_ID = CMS_ONLINE_STRUCTURE.STRUCTURE_ID \
WHERE \
CMS_ONLINE_STRUCTURE.STRUCTURE_ID IS NULL \
GROUP BY \
CMS_HISTORY_STRUCTURE.STRUCTURE_ID
C_MYSQL_VISITED_USER_DELETE_2=\
DELETE \
FROM CMS_SUBSCRIPTION_VISIT \
WHERE \
CMS_SUBSCRIPTION_VISIT.USER_ID=? \
ORDER BY CMS_SUBSCRIPTION_VISIT.VISIT_DATE ASC \
LIMIT ?
© 2015 - 2024 Weber Informatics LLC | Privacy Policy