diff --git a/README.md b/README.md
index 764178e..feb22a1 100644
--- a/README.md
+++ b/README.md
@@ -23,5 +23,7 @@ If you want to download a copy and install from a local file go to the [Install]
If you have a recommendations, please add your idea and/or snippet examples as an [issue](https://github.com/OraOpenSource/oos-utils/issues).
+Starting with `1.1.0` all PRs should be the appropriate release branch rather than master.
+
### Build
If you are working on OOS Utils and want to test your build go to the [build](/build) folder for instructions.
diff --git a/docs/oos_util_lob.md b/docs/oos_util_lob.md
index e7b5640..95d1965 100644
--- a/docs/oos_util_lob.md
+++ b/docs/oos_util_lob.md
@@ -1,6 +1,7 @@
# OOS_UTIL_LOB
+
- [Constants](#constants)
@@ -85,7 +86,8 @@ Name | Description
### Syntax
```plsql
function blob2clob(
- p_blob in blob)
+ p_blob in blob,
+ p_blob_csid in integer default dbms_lob.default_csid)
return clob
```
@@ -93,6 +95,7 @@ function blob2clob(
Name | Description
--- | ---
`p_blob` | blob to be converted to clob
+`p_blob_csid` | Encoding to use. See https://docs.oracle.com/database/121/NLSPG/ch2charset.htm#NLSPG169 (table 2-4) for different charsets. Can use nls_charset_id(<charset>) to get the clob_csid
*return* | clob
diff --git a/install/create_synonyms.sql b/install/create_synonyms.sql
index ffb0d93..2f159be 100644
--- a/install/create_synonyms.sql
+++ b/install/create_synonyms.sql
@@ -1,8 +1,8 @@
--- Grants privileges for OOS Utils objects from current user to a defined user
+-- Creates synonyms from defined user for OOS Utils objects
-- Use this if storing OOS Utils in its own schema and other schemas reference it.
-- Parameters
-define to_user = '&1' -- This is the user to grant the permissions to
+define from_user = '&1' -- This is the user to reference OOS Utils objects
whenever sqlerror exit sql.sqlcode
diff --git a/install/oos_utils_install.sql b/install/oos_utils_install.sql
index 6b83058..fea39c0 100644
--- a/install/oos_utils_install.sql
+++ b/install/oos_utils_install.sql
@@ -143,7 +143,7 @@ as
-- Version numbers. Useful for anyone writing condtional compilation for OOS Utils
gc_version_major constant pls_integer := 1;
gc_version_minor constant pls_integer := 0;
- gc_version_patch constant pls_integer := 0;
+ gc_version_patch constant pls_integer := 1;
gc_version constant varchar2(30) := gc_version_major || '.' || gc_version_minor || '.' || gc_version_patch;
@@ -3729,7 +3729,8 @@ as
return blob;
function blob2clob(
- p_blob in blob)
+ p_blob in blob,
+ p_blob_csid in integer default dbms_lob.default_csid)
return clob;
function get_file_size(
@@ -3837,10 +3838,12 @@ as
* @author Martin D'Souza
* @created 02-Mar-2014
* @param p_blob blob to be converted to clob
+ * @param p_blob_csid Encoding to use. See https://docs.oracle.com/database/121/NLSPG/ch2charset.htm#NLSPG169 (table 2-4) for different charsets. Can use `nls_charset_id()` to get the clob_csid
* @return clob
*/
function blob2clob(
- p_blob in blob)
+ p_blob in blob,
+ p_blob_csid in integer default dbms_lob.default_csid)
return clob
as
l_clob clob;
@@ -3849,6 +3852,7 @@ as
l_lang_context integer := dbms_lob.default_lang_ctx;
l_warning integer;
begin
+ oos_util.assert(p_blob_csid is not null, 'p_blob_csid is required: ' || p_blob_csid);
if p_blob is null then
return null;
end if;
@@ -3863,7 +3867,7 @@ as
amount => dbms_lob.lobmaxsize,
dest_offset => l_dest_offset,
src_offset => l_src_offset,
- blob_csid => dbms_lob.default_csid,
+ blob_csid => p_blob_csid,
lang_context => l_lang_context,
warning => l_warning);
diff --git a/source/packages/oos_util_lob.pkb b/source/packages/oos_util_lob.pkb
index 4df5165..04714f9 100644
--- a/source/packages/oos_util_lob.pkb
+++ b/source/packages/oos_util_lob.pkb
@@ -69,10 +69,12 @@ as
* @author Martin D'Souza
* @created 02-Mar-2014
* @param p_blob blob to be converted to clob
+ * @param p_blob_csid Encoding to use. See https://docs.oracle.com/database/121/NLSPG/ch2charset.htm#NLSPG169 (table 2-4) for different charsets. Can use `nls_charset_id()` to get the clob_csid
* @return clob
*/
function blob2clob(
- p_blob in blob)
+ p_blob in blob,
+ p_blob_csid in integer default dbms_lob.default_csid)
return clob
as
l_clob clob;
@@ -81,6 +83,7 @@ as
l_lang_context integer := dbms_lob.default_lang_ctx;
l_warning integer;
begin
+ oos_util.assert(p_blob_csid is not null, 'p_blob_csid is required: ' || p_blob_csid);
if p_blob is null then
return null;
end if;
@@ -95,7 +98,7 @@ as
amount => dbms_lob.lobmaxsize,
dest_offset => l_dest_offset,
src_offset => l_src_offset,
- blob_csid => dbms_lob.default_csid,
+ blob_csid => p_blob_csid,
lang_context => l_lang_context,
warning => l_warning);
diff --git a/source/packages/oos_util_lob.pks b/source/packages/oos_util_lob.pks
index a8dc538..c412531 100644
--- a/source/packages/oos_util_lob.pks
+++ b/source/packages/oos_util_lob.pks
@@ -39,7 +39,8 @@ as
return blob;
function blob2clob(
- p_blob in blob)
+ p_blob in blob,
+ p_blob_csid in integer default dbms_lob.default_csid)
return clob;
function get_file_size(