SQLite in MQL5: new features and performance testing - page 4

 
Pavel Kolchin:

If you want to exchange data between terminals, what if you make it possible to connect one terminal for editing and the other only for reading? And all this via super-fast memory

Will it work in mql4?

Use Memlib.mqh.

 
Dmitiry Ananiev:

Use Memlib.mqh.

did not find what it is

 
Sergey Dzyublik:

Please also pay attention to the following shortcomings which I have discovered:

1) The DatabaseExecute function description is not true, but copied from DatabasePrepare.

2) Incomplete description of the first parameter ofDatabaseRead function:intdatabase, // database handle obtained in DatabaseOpen;
Since DatabasePrepare provides more complete information: // creates a query handle, which can then be executed with DatabaseRead().

5) There is a typo in the DatabaseColumnName function parameter description (it should be "to get the field name").

string&name// reference to a variable to get the nameof a table

Thank you, it has been corrected. An update will be available on the website in the Database Management section.

Документация по MQL5: Работа с базами данных
Документация по MQL5: Работа с базами данных
  • www.mql5.com
Важной особенностью данного движка является то, что вся база данных находится в единственном стандартном файле, который находится на компьютере пользователя. Простота реализации достигается за счёт того, что перед началом исполнения транзакции записи файл, содержащий базу данных, блокируется. При этом...
 
An SQL query has a special format. It is not pure SQL. Everything is written inside the function call and without commas between strings? Or can Iinitialize a stringarray? I need examples.
 
Rashid Umarov:

Thank you, it's been fixed. The update will be on the website in the Database handling section.


DatabaseRead parameters in the description are not correct.

Has to takea handle to the SQL query.


Already rewrote my project with imported sqlite3 dll, to the built-in functionality - everything is fine.


P.S. Check LastError reset functionality in Database.... functions.

 
Renat Fatkhullin:
We have no such task in front of us at all.

In front of you, yes, it doesn't. Developers, on the other hand, have long needed some kind of adequate thread-safe messaging mechanism. Bases seem to be a good option for this, albeit not directly, but through additional thread-safe wrappers.

 
Vasiliy Sokolov:

In front of you, yes, it shouldn't. Developers, on the other hand, have long needed some kind of adequate thread-safe messaging mechanism. Bases seem to be a good option for this, albeit not directly, but through additional thread-safe wrappers.

 
Renat Fatkhullin:

Most likely we will allow in resources and these files will be automatically extracted to disk the first time we run the program.

That is, there will be no swelling of the base inside ex5. You can only work with the file on disk.

Also, please consider another needed functionality.
We need a function DatabaseSaveMemoryToFile, which will save the database opened as DATABASE_OPEN_MEMORY, in a file to disk.
That is to use memory for speed of data exchange, and if necessary, save data to file to disk.
As it is done in Market Watch, first data comes to Market Watch and then saved to history.

And a function to extract back, from file to memory DatabaseExtractFileToMemory
This is how the KDB+ database works
 
It may not be widely known that when you save a resource to disk with ResourceSave, the non-colour data is distorted. This function is only designed for saving images.

This is to address the issue of including the database in the resource and saving it to disk.
 
Реter Konow:
It may not be widely known that when you save a resource to disk with ResourceSave, the non-colour data is distorted. This function is only designed for saving images.

This goes to the question of including the database in the resource and storing it on disk.

The inclusion of the databasefile into the resource, most likely, is intended only for the initial unpacking of the file to disk, from ex5.
Further work with the database is done directly with the file.