You are not logged in.
Pages: 1
I see InitCSV was removed from mORMot2 in past year, any builtin alternative for it?
Offline
We did not "remove" this method, we renamed it because it was very misleading.
If you want to work as InitCsv() did in the past, just use TDocVariantData.InitFromPairs.
Because in fact, InitCsv() was NOT about load CSV content, but about loading pairs of name/value data.
If you want to work with a true CSV input, you have DynArrayLoadCsv() from mormot.core.search.pas.
It allows to fill a dynamic array of fields, directly from the CSV.
It is both much faster and more conformant to the CSV standard.
See e.g. how https://github.com/synopse/mORMot2/blob … angCmp.dpr uses it to load very efficiently a huge CSV, and quickly access its content.
Offline
Pages: 1