• last updated 19 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Do not enforce that body is a list

Fix typo

Performance improvements:

- set variables from the ns_set and extended variables separately

- collect the values and append to the multirow in one sweep

- when no code body is there, just bulk append the values

This appears to be ~5% faster than db_multirow when both are invoked with a code body and ~30% faster when invoked without (with no prepared statements)

Simplify idiom

Fix behavior of continue in the multirow code block, make the generic fallback behave the same as the postgres version with respect to appending

Cleanup leftover line

Provide an ::xo::dc api to generate multirows

Notable differences with the classical db_multirow:

- a multirow will always be appended when it already exists. The constraint that the two multirows must have the same columns remains.

- no "if_no_rows_code_block"

- no unclobber

- no subst, do it yourself :-)

- no cache stuff

- support for prepared statements

The remaining behavior has been kept the same, e.g. variables will always be reset to empty string, even if they existed outside of the code block. Compatibility has been checked with knowns idiosyncrasies.

Provide, as for other interfaces, a Postgres implementation of database foreach that will support prepared statements won't just wrap the db_* api

Make sure the original SQL stays unchanged, as it is used e.g. in the nsv storing the statement and in log messages

Improve the approach with strings containing colons in prepared SQL statements:

we first normalize all strings with a safe placeholder, substitute the variables, then put the strings back in place.

Improve the regexp detecting variables in a prepared statement, so that a prepared variable must not be preceded by a semicolon (as before), but also by any character allowed for a variable name

Allow to prepare a statement with no parameters (See https://www.postgresql.org/docs/11/sql-prepare.html)

Add doc to public api

  1. … 1 more file in changeset.
new proc "ad_log_deprecated": unified interface for logging deprecated usages

The existing code used a larger variety of different messages to

denote invocations of deprecated procs and other

artifacts. "ad_log_deprecated" provides a unified interface, and

provides a usage hint what to use instead based on the API-doc

definitions in the log-file.

  1. … 11 more files in changeset.
Fix typo

Fix typo

Make ::xo::db::require package a shorthand for ::xo::library require, which will remember the dependency

This will also make sure that dependent files are reloaded when a dependency is reloaded

prefer global variable over proc

  1. … 6 more files in changeset.
improve comment

Prefer "::acs::dc call ..." over "::xo::db::sql::..."

Use the common new acs interface rather than the xotcl-core variant.

Goal should be on the medium time range to replace all of the

"::xo::db::sql::*" interface.

  1. … 2 more files in changeset.
Fixes for Oracle 19c: boolean and timestamp handling, *lobs

- fix boolean permission query

- function "now()" does not exist, use "CURRENT_TIMESTAMP" instead

- revived blob and clob handling in "xo::dc dml" since this is needed

for updating

- modernize Oracle offset/limit handling

- added missing "-dbn" attributes for Oracle xo::dc calls

  1. … 2 more files in changeset.
Fixes for Oracle 19c: consistenly rely on uppercasing of the schema names in the called functions

Fixes for Oracle 19c:

- added special rules for DML differences in Oracle ("MODIFY" option in ALTER TABLE)

- fixed call of ns_pg_bind in Oracle applications

- fixed call of an SQL function returning a table

Improved startup time (of server, of threads) by using nsv_dict when available

During definition of attributes, the xo-db inteface checks whether

the db attributes managed by xotcl are in sync with the actual database.

This was done so far by a couple of small database query. When nsv_dict

is available, it can be used for quickly checking those values.

make function private

improved prepared-statement handling

- avoid separate SQL statement for testing, whether prepared statement

exists already in the SQL session.

- use true SQL session-id (obtained via "ns_pg pid") when available

- improve source code documentation

deactive callback definition to avoid calls of deprecated xo::parameter functions

  1. … 1 more file in changeset.
modernize code

simplify code (allow warning, although i am not fully convinced, this is a good idea)

  1. … 1 more file in changeset.
move documentation to the generic level, don't make methods public, which are intentionally non-public