Index: openacs-4/packages/acs-core-docs/www/db-api.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/db-api.adp 12 Feb 2019 17:12:18 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/db-api.adp 12 Feb 2019 17:43:02 -0000 1.7 @@ -525,34 +525,6 @@ } -
-db_nullify_empty_string
-
-db_nullify_empty_string string
-

For true SQL purists, we provide the convenience function -db_nullify_empty_string, which -returns [db_null] if its string argument is the empty -string and can be used to encapsulate another Oracle quirk:

-
-set baz ""
-
-# Clean out the foo table
-#
-db_dml unused {delete from foo}
-db_dml unused {insert into foo(baz) values(:baz)}
-
-set n_rows [db_string unused "select count(*) from foo where baz is null"]
-#
-# $n_rows is 1; in effect, the "baz is null" criterion is matching
-# the empty string we just inserted (because of Oracle's coercion
-# quirk)
-
-          

To balance out this asymmetry, you can explicitly set -baz to null by writing:

-
-db_dml foo_insert {insert into foo(baz) values(:1)} {[db_nullify_empty_string $baz]}
-
-          

($‌Id: db-api.xml,v 1.14 2017/08/07 23:47:54 gustafn Exp $)

Index: openacs-4/packages/acs-core-docs/www/db-api.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api.html,v diff -u -r1.54 -r1.55 --- openacs-4/packages/acs-core-docs/www/db-api.html 12 Feb 2019 17:12:18 -0000 1.54 +++ openacs-4/packages/acs-core-docs/www/db-api.html 12 Feb 2019 17:43:02 -0000 1.55 @@ -845,51 +845,7 @@ } -
- - - db_nullify_empty_string - - -
-
-db_nullify_empty_string string
-	  
-

For true SQL purists, we provide the convenience function - db_nullify_empty_string, which returns - [db_null] if its string argument is the empty string - and can be used to encapsulate another Oracle quirk:

- -
-
-set baz ""
-
-# Clean out the foo table
-#
-db_dml unused {delete from foo}
-db_dml unused {insert into foo(baz) values(:baz)}
-
-set n_rows [db_string unused "select count(*) from foo where baz is null"]
-#
-# $n_rows is 1; in effect, the "baz is null" criterion is matching
-# the empty string we just inserted (because of Oracle's coercion
-# quirk)
-
-	  
- -

- To balance out this asymmetry, you can explicitly set baz to - null by writing: -

- - -
-
-db_dml foo_insert {insert into foo(baz) values(:1)} {[db_nullify_empty_string $baz]}
-
-	  
-

Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/db-api.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/db-api.xml,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/db-api.xml 12 Feb 2019 17:12:18 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/db-api.xml 12 Feb 2019 17:43:02 -0000 1.19 @@ -968,57 +968,6 @@ - - - - - - db_nullify_empty_string - - - - - -db_nullify_empty_string string - - - For true SQL purists, we provide the convenience function - db_nullify_empty_string, which returns - [db_null] if its string argument is the empty string - and can be used to encapsulate another Oracle quirk: - - - -set baz "" - -# Clean out the foo table -# -db_dml unused {delete from foo} -db_dml unused {insert into foo(baz) values(:baz)} - -set n_rows [db_string unused "select count(*) from foo where baz is null"] -# -# $n_rows is 1; in effect, the "baz is null" criterion is matching -# the empty string we just inserted (because of Oracle's coercion -# quirk) - - - - - To balance out this asymmetry, you can explicitly set baz to - null by writing: - - - - - -db_dml foo_insert {insert into foo(baz) values(:1)} {[db_nullify_empty_string $baz]} - - - - -