We have add initial implementation of SQL command ‘ALTER LINK ‘, which allows to rename a Valentina Link. Details can be found in the Valentina WIKI here.
We have add initial implementation of SQL command ‘ALTER LINK ‘, which allows to rename a Valentina Link. Details can be found in the Valentina WIKI here.
Today I added new reference pages to the wiki of e.g. SQL grammar about a new feature of Valentina DB for 5.0: the ENUM type.
This is the first step towards a CREATE TYPE command based on the SQL 2003 standard. Next we can add composite types, collection types and inheritance.
We think that Valentina can have a more effective and flexible ENUM implementation compared to PostgreSQL or mySQL. One example is that Valentina can use 1 byte to store an enum value, while mySQL – 2, PostgreSQL – 4.
We are finishing now integration of this feature into Valentina Studio for both Valentina DB and PostgreSQL plugins. Database types in Valentina Studio are supported through a plugin architecture.
These are major entry points in the Valentina Wiki to check:
Hi All,
We have remove couple of wrong things in 4.x VSQL parser. Please prepare your code to remove this deprecated syntax.
Continue reading Changes in SQL parser for 5.0. Be prepared please.
We have realize problem of unicode text normalization and have implement tools into 4.9.1 to work with normalization issue. Detailed description of this issue is given on the following wiki page.
This tip is expired by article two-steps-forward-to-more-secure-applications. The First part of the article discusses SQL Injection Attack and how to develop code protected from it.
After read of the article you will know that to easy way for protection – is usage of SQL binding. Wow? One more reason to ALWAYS use SQL binding! Other well known reason are
Starting from 4.8 build you may pass pictures as a binded value to the queries using V4NET ADK.
There is a new property – LogFilesLocation for both server and local.
It defines a folder where the logs should be placed in.
Default folder is “./vlogs”
ObjectPtr field contains RecID values of some “target” table. If you need to change ObjectPtr in order to point another table those values are not valid anymore – so default behavior is to nullify them. But sometime it looks to be too strong. For instance – changing field or link name or on-delete policy should not cause such data zeroing.
There are two ways to keep existed values altering ObjectPtr:
Ivan have implement today MD5() function, which can be used in EXPRESSION of Valentina SQL.
Bart have asked this function to be able produce UNIQUE INDEX for strings/texts bigger of 128 chars. This limit comes from fact that indexes of Valentina use pascal-like storage format for strings, e.g. 256 bytes maximum, 128 for UTF16.
We have extend syntax of SHOW PROCEDURES to SHOW PROCEDURES [ALL].
In 4.5.1 release we have add a new REGEX_REPLACE() function to Valentina Expresions, which can be used in Table Methods, SQL and therefore, in Reports.
Up to now, we was able to do searches with the help of REGEX operator:
… WHERE fld REGEX ‘ab.[cdf]*’
New function brings the awesome power of REGEX to manipulate by strings stored in the database! Now we can not only search using REGEX, but modify strings! You can do that in the
where EXPR is REGEX_REPLACE() function or contains it as a part.
Read details about this function here.
In some cases we can avoid copying sub-query result to the temporary table. We can even use sub-query cursor “as is” – so it could be used as a result of the whole query. In other words there is almost zero overhead against a simple query.
For now such optimization can be applied if a query:
Examples:
SELECT * FROM (SELECT * FROM t1 WHERE f1 > 5);
SELECT * FROM (SELECT t1.f1, t2 f1 FROM t1 JOIN t2 ON l1 WHERE t1.f1 > 5 AND t2.f1 <3);
We have add for VIEWs ability to be temporary, like we allow for Tables, Fields, Links. Temporary objects are not stored in the schema (.vdb file).
Also we have add for consistency IF NOT EXISTS clause to CREATE VIEW command.
We have add into v4.3 support of default parameters for stored procedures.
CREATE PROCEDURE( IN param INT = 2 ) …
Most Valentina SQL commands of kind CREATE SOMETHING have clause ‘OR REPLACE’. You should understand that this clause forces DROP of existed object before new will be created. This means that all its sub-objects also will be deleted. To avoid this use ALTER command.
For 4.3 we have add ALTER VIEW command.