This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MLE inline call spec in 23.3 (does not work in 24.4) anymore | |
/* | |
create or replace function find_terms ( | |
"in_terms" in varchar2, | |
"in_text" in varchar2 | |
) return json is mle language javascript q'[ | |
var found_terms = []; | |
var terms_array = in_terms.split(','); | |
for (var i = 0; i < terms_array.length; i++) { | |
var term = terms_array[i].trim().toLowerCase(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- -------------------------------------------------------------------------------------------------------------------- | |
-- Minimal Arbori program (expected by the formatter, also expected: "order_by_clause___0"). | |
-- -------------------------------------------------------------------------------------------------------------------- | |
include "std.arbori" | |
dummy: :indentConditions & [node) identifier; | |
skipWhiteSpaceBeforeNode: runOnce -> { var doNotCallCallbackFunction;} | |
dontFormatNode: [node) numeric_literal | [node) path ->; | |
-- -------------------------------------------------------------------------------------------------------------------- | |
-- Keep existing whitespace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ------------------------------------------------------------------------------------------------ | |
-- do-it-yourself implementation of any_value for strings | |
-- based on http://db-oriented.com/2021/02/20/diy-any_value/ | |
-- use Oracle Database 9i or higher, connected as HR user. | |
-- ------------------------------------------------------------------------------------------------ | |
create or replace type any_value_string_t as object | |
( | |
v_value varchar2(4000), | |
static function odciaggregateinitialize(sctx in out any_value_string_t) return number, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name":"com.trivadis.plsql.formatter.TvdFormat", | |
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]} | |
, | |
{ | |
"name":"java.lang.ClassLoader", | |
"methods":[ | |
{"name":"getPlatformClassLoader","parameterTypes":[] }, | |
{"name":"loadClass","parameterTypes":["java.lang.String"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.oracle.truffle.js.scriptengine.GraalJSScriptEngine; | |
import org.graalvm.polyglot.Context; | |
import javax.script.ScriptContext; | |
import javax.script.ScriptEngine; | |
import javax.script.ScriptException; | |
import java.util.HashMap; | |
public class Demo { | |
public static void main(String[] args) throws ScriptException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PACKAGE BODY om_tapigen IS | |
----------------------------------------------------------------------------- | |
-- private global constants (c_*) | |
----------------------------------------------------------------------------- | |
c_generator_error_number CONSTANT PLS_INTEGER := -20000; | |
c_lf CONSTANT VARCHAR2(2 CHAR) := chr(10); | |
c_lflf CONSTANT VARCHAR2(3 CHAR) := chr(10) || chr(10); | |
c_list_delimiter CONSTANT VARCHAR2(3 CHAR) := ',' || c_lf; | |
c_custom_defaults_present_msg CONSTANT VARCHAR2(30) := 'SEE_END_OF_API_PACKAGE_SPEC'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2018 Philipp Salvisberg <philipp.salvisberg@trivadis.com> | |
* | |
* Licensed 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2017 Philipp Salvisberg <philipp.salvisberg@trivadis.com> | |
* | |
* Licensed 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT | |
INTO tvd_captured_sql_t ( | |
cap_id, | |
cap_source | |
) | |
VALUES ( | |
tvd_captured_sql_seq.nextval, | |
q'[ | |
insert into tab1 (x,y,z) select a,b,c from tab2 where tab2.n = 'N'; | |
]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2016 Philipp Salvisberg <philipp.salvisberg@trivadis.com> | |
* | |
* Licensed 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 |
NewerOlder