Skip to content

Instantly share code, notes, and snippets.

View dgielis's full-sized avatar

Dimitri Gielis dgielis

View GitHub Profile
@dgielis
dgielis / app_error_pkg.sql
Created June 30, 2018 21:21
Custom Error Handling function for APEX
create or replace package app_error_pkg
as
--
-- Function: apex_error_handling
-- Purpose: Try to elegantly handle errors that occur while using the application.
--
function apex_error_handling (
p_error in apex_error.t_error )
return apex_error.t_error_result;
--
create or replace package ora_dev_cloud_pkg as
/*
Purpose : Oracle Developer Cloud module
history
Version Date By Description
------- ----------- ---------------- ----------------------------------------------
0.1 22-FEB-2018 Dimitri First version, based on Dimitri's blog post
@dgielis
dgielis / oracle_apex_team_dev_2_bitbucket.sql
Last active March 13, 2018 14:10
Load Oracle APEX Team Development into Bitbucket issues
declare
l_clob clob;
l_body clob;
begin
for r in (select feature_name as title, '*'||focus_area||'*' ||feature_description || ' ' || publishable_description || '' as description
from apex_team_features
where nvl(feature_status,0) < 100 and nvl(focus_area,'A') <> 'ON HOLD')
-- change where to what you need
loop
apex_json.initialize_clob_output;
@dgielis
dgielis / model_to_quicksql.sql
Last active December 20, 2021 18:19
Reverse engineer existing Oracle tables to Quick SQL
declare
l_prefix varchar2(15) := 'EBA_DBTOOLS';
l_spaces varchar2(10) := ' '; -- use '&nbsp;' in web
l_enter varchar2(10) := CHR(10); -- use '<br/>' in web
l_constraint varchar2(500);
begin
for t in (select t.table_name,
case when m.comments is not null then ' [' || replace(replace(replace(m.comments,'[','{'),']','}'),CHR(10)) ||']' end as comments
from user_tables t, user_tab_comments m,
(select max(lvl) as lvl, table_name
@dgielis
dgielis / mtl_auth_pkg.pkb
Last active September 9, 2023 18:48
Multiplication Table: Custom Authentication package body for Oracle APEX
create or replace package body mtl_auth_pkg
as
/**
* Constants
*/
c_from_email constant varchar2(100) := 'no-reply@my.email';
c_website constant varchar2(100) := 'my site';
c_hostname constant varchar2(100) := 'my hostname';
@dgielis
dgielis / mtl_auth_pkg.pks
Created August 29, 2017 07:17
Multiplication Table: Custom Authentication package for Oracle APEX
create or replace package mtl_auth_pkg
as
/**
* Project: Multiplication Table
* Author: APEX RnD - Dimitri Gielis
* Description: Custom Authentication and Authorization
* Note: None
* @headcom
*/