Tag Archives: databases

TLiveIni – Custom Delphi INI Implementation

Text and code by Ron Maupin.

liveiniprocessflow
I had to build my enhanced INI class that replaces the database. My Modula-2 version used a doubly-linked list (section) of doubly-linked lists (key/value pairs) for the INI. Delphi’s generics made this much easier, and I now use the TDictionary, although it could be done with TStringList. I used the Delphi ability to have an array property (IniFile[Section,Value]) to simplify assignments and set it as the default property of the INI object. I also didn’t want to get lost in the weeds of having different properties or methods for different data types, so I built some record helpers in the application for different data types that simplify assignment (IntVar := IniFile[Section,Value].ToInt or IniFile[Section,Value] := BoolVar.ToStr).
Continue reading

SQLite: Referential Integrity With Full Text Search Virtual Tables (used in a Delphi application)

sqlite-fts-ref-integrity
As a second step in my goal to implement full text search functionality in my Delphi application I had to create a sample SQLite database supporting FTS queries.
Full text search models in databases allow to do what Google does with web documents – quickly search for documents containing some word (token).
Continue reading