Compare commits

..

No commits in common. "62180b9cf68ac7a4e345a34d0cbf7e59eb394716" and "b33bafb753e8512d3cf9b88c4fc30d0f3367683c" have entirely different histories.

5 changed files with 11 additions and 11 deletions

View File

@ -19,6 +19,8 @@ while true; do
echo "Running ./gradlew test" echo "Running ./gradlew test"
source .aliases # only variables, aliases are not expanded in scripts source .aliases # only variables, aliases are not expanded in scripts
./gradlew test ./gradlew test
else
echo "no changes detected on the origin branch"
fi fi
echo -e "waiting for changes..." echo -e "waiting for changes..."

View File

@ -123,8 +123,7 @@ declare
begin begin
targetTable := lower(targetTable); targetTable := lower(targetTable);
-- "-0-" to put the trigger execution before any alphabetically greater tx-triggers createTriggerSQL = 'CREATE TRIGGER tx_journal_tg' ||
createTriggerSQL = 'CREATE TRIGGER tx_0_journal_tg' ||
' AFTER INSERT OR UPDATE OR DELETE ON ' || targetTable || ' AFTER INSERT OR UPDATE OR DELETE ON ' || targetTable ||
' FOR EACH ROW EXECUTE PROCEDURE basis.tx_journal_trigger()'; ' FOR EACH ROW EXECUTE PROCEDURE basis.tx_journal_trigger()';
execute createTriggerSQL; execute createTriggerSQL;

View File

@ -12,14 +12,14 @@ declare
historicalTxId xid8; historicalTxId xid8;
historicalTimestamp timestamp; historicalTimestamp timestamp;
begin begin
select coalesce(current_setting('hsadminng.tx_history_txid', true), '') into historicalTxIdSetting; select coalesce(current_setting('hsadminng.basis.tx_history_txid', true), '') into historicalTxIdSetting;
select coalesce(current_setting('hsadminng.tx_history_timestamp', true), '') into historicalTimestampSetting; select coalesce(current_setting('hsadminng.tx_history_timestamp', true), '') into historicalTimestampSetting;
if historicalTxIdSetting > '' and historicalTimestampSetting > '' then if historicalTxIdSetting > '' and historicalTimestampSetting > '' then
raise exception 'either hsadminng.tx_history_txid or hsadminng.tx_history_timestamp must be set, but both are set: (%, %)', raise exception 'either hsadminng.basis.tx_history_txid or hsadminng.tx_history_timestamp must be set, but both are set: (%, %)',
historicalTxIdSetting, historicalTimestampSetting; historicalTxIdSetting, historicalTimestampSetting;
end if; end if;
if historicalTxIdSetting = '' and historicalTimestampSetting = '' then if historicalTxIdSetting = '' and historicalTimestampSetting = '' then
raise exception 'either hsadminng.tx_history_txid or hsadminng.tx_history_timestamp must be set, but both are unset or empty: (%, %)', raise exception 'either hsadminng.basis.tx_history_txid or hsadminng.tx_history_timestamp must be set, but both are unset or empty: (%, %)',
historicalTxIdSetting, historicalTimestampSetting; historicalTxIdSetting, historicalTimestampSetting;
end if; end if;
-- just for debugging / making sure the function is only called once per query -- just for debugging / making sure the function is only called once per query
@ -150,8 +150,7 @@ begin
raise notice 'sql: %', createViewSQL; raise notice 'sql: %', createViewSQL;
execute createViewSQL; execute createViewSQL;
-- "-9-" to put the trigger execution after any alphabetically lesser tx-triggers createTriggerSQL = 'CREATE TRIGGER ' || baseTable || '_tx_historicize_tg' ||
createTriggerSQL = 'CREATE TRIGGER tx_9_historicize_tg' ||
' AFTER INSERT OR DELETE OR UPDATE ON ' || baseTable || ' AFTER INSERT OR DELETE OR UPDATE ON ' || baseTable ||
' FOR EACH ROW EXECUTE PROCEDURE tx_historicize_tf()'; ' FOR EACH ROW EXECUTE PROCEDURE tx_historicize_tf()';
raise notice 'sql: %', createTriggerSQL; raise notice 'sql: %', createTriggerSQL;

View File

@ -71,7 +71,7 @@ public class ArchitectureTest {
"..rbac.rbacuser", "..rbac.rbacuser",
"..rbac.rbacgrant", "..rbac.rbacgrant",
"..rbac.rbacrole", "..rbac.rbacrole",
"..rbac.rbacobject", "..rbac.object",
"..rbac.rbacdef", "..rbac.rbacdef",
"..stringify" "..stringify"
// ATTENTION: Don't simply add packages here, also add arch rules for the new package! // ATTENTION: Don't simply add packages here, also add arch rules for the new package!

View File

@ -52,7 +52,7 @@ public abstract class ContextBasedTest {
protected void historicalContext(final Long txId) { protected void historicalContext(final Long txId) {
// set local cannot be used with query parameters // set local cannot be used with query parameters
em.createNativeQuery(""" em.createNativeQuery("""
set local hsadminng.tx_history_txid to ':txid'; set local hsadminng.basis.tx_history_txid to ':txid';
""".replace(":txid", txId.toString())).executeUpdate(); """.replace(":txid", txId.toString())).executeUpdate();
em.createNativeQuery(""" em.createNativeQuery("""
set local hsadminng.tx_history_timestamp to ''; set local hsadminng.tx_history_timestamp to '';
@ -66,7 +66,7 @@ public abstract class ContextBasedTest {
set local hsadminng.tx_history_timestamp to ':timestamp'; set local hsadminng.tx_history_timestamp to ':timestamp';
""".replace(":timestamp", txTimestamp.toString())).executeUpdate(); """.replace(":timestamp", txTimestamp.toString())).executeUpdate();
em.createNativeQuery(""" em.createNativeQuery("""
set local hsadminng.tx_history_txid to ''; set local hsadminng.basis.tx_history_txid to '';
""").executeUpdate(); """).executeUpdate();
} }