Skip add RETURNING on auto set if 'NULL' is set as a primary key.
On return, also run if count of returned ids is > 0 (so it actually runs
the extended return flow)
In case no primary key is set and the auto detect does not return a
primary key, set the primary key variable to 'NULL' string to trigger
skip in returning insert id flow.
The data write function did not write data correctly if it was empty or
null. Especially for boolean ones when set 0 was set NULL and not 'f'.
This is fixed now.
Also filles MUST set not null fields with 0/'' but does not add missing
column to list yet
Data was not written correctly in connection with boolean field types as
the "has default" was used as if a default value, but it is just a flag
IF it has a default value
- DB IO: update the write data method to update data that is empty (aka
null) and not skip it (aka never unset data)
- Basic: add date time compare method based on strtotime
- Login: ACL for page level check if array is set before setting
anything
In basic class, do SET_SESSION_NAME check with isset to avoid notice log
entries.
Change log/error return for execute data error
base postgresql calss calls set the last run query on error if no result
is returned for prepare and execute
Because browsers buffer size increased again I centralized the buffer
clear flow.
It now sends a 1024*256 bytes empty string before it runs an ob_flush
and flush call.
This should work with most browsers out there. Tested on macOS
firefox/safari/chrome
A global define for LOG_FILE_ID before any class is initialized (or any
place later allowed too) will add a sub id to the error_msg log file
before any other (level, class, etc) id.
This can be used to easily split between frontend and backend logs or
logs for a certain page without using pagename (eg to group all ajax
logs into one)
- Basic class still had a "split" call -> change that to explode
- The prepare DB IO part missed setting pk name for the cursor to null
so no returning is assumed
- all data stored in array (size contrain needs to be checked)
- allows any returning data
- only named rows are returned (no numbers for column access)
- if multiple rows then insert_id is an array with the return data
- if single row the insert_id holds the PK, and insert_id_ext holds
extended data if exists
If an INSERT had multiple inserts (values) the returning only returned
the first one and never the other ones.
This is fxed now.
If only ONE. then insert_id is scalar, else it is an array with all the
data in a flat array
The date part is not set external, but internal via a flag.
The file name extension cannot be set anymore and the file_name_ext has
been removed and is now log_file_name_ext and privte.
This is a drop in solution and can be used with previous settings.
Changes that should be done:
Class.Login: remove the file name ext and replace it with log_per_class
= 1
Remove all file_name_ext entries as they area not needed anymore
class basic has a simple date string format method. returns Y-m-d h:i:s
for a trimestring, optional microseconds too
bug fix for unit/edit access id check in login class
An edit page can have a new type of reference data type that is not a
link between table A and main table, but a sub table to main table with
several text fields + enable field.
This sub field list can have a max set, that adds empty rows to keep max
empty list available.
The sub table filed does not need a read_data element as the read is
directly connected to the master table (uses the elemen list key name
for table and the elements as read fields).
This sub elements need to have at least one as type = text and can have
error check addded (currently unique and alphanumeric work).
Also fix all old addslashes to correct db_escape_string
Read in for reference list also can have multiple elements (read data ->
name | seperated)
All sub reads have element prefixes
Inline documentation update
edit access data is read and put into the unit (edit access) array
the base acl method is adjusted to the current simple flat array one
- base acl only
- no max anymore (never needed)
- page acl
- unit (edit access) acl list + detail data
Form class has new check part for alpha numeric with spaces called
"alphanumericspace".
edit access table array gets update for making color no longer mandatory
(almost never used).
And adds alpha numeric with spaces and unique check for the name.
Trigger that gets called when edit access table is insert or update
called.
UID is set by removing all white spaces.
Original name set is already checked for Alphanumeric with spaces and
unique check.
On Insert always set UID.
On Update only set if UID is not set yet.