Now you can use the indexing features of the dictionary/map and all Tstringlist features are available to manipulate the contents.
But you can also use e.g. a (couple of) TBufDataset to store indentifier, strings and highlighter.
Inifile/xml/json means making the SQL available to the end user - same with unencrypted SQLite, and SQLite is overkill anyway. I vaguely considered dumping a series of text files into a zip file, but again seems overkill.if my memory serves me right there was a string manager in one of the turbo power products (turbo power essentials or orpheus) I have no idea if the port to lazarus inlcude that component so.....
I considered TMemo with one line per SQL, won't be a pretty solution though (I prefer my SQLs presented multi-line)
It's easy to implement a TComponent descendant that does what I want, I just didn't want to do spend the time if we we already had something similar in Lazarus CCR. Seeing as how other responses are around implementation detail rather than confirming if the wheel exists, I'll assume there isn't such a component.
Many thanks :-)
'SELECT ' +
' EH.EQUIPMENT_ID, ' +
' EH.EQUIPMENT_HISTORY_ID, ' +
' CASE ' +
' WHEN EH.PARENT_EQUIPMENT_ID IS NULL THEN '''' ' +
' ELSE PED.EQUIPMENT_TYPE||'' [''||PED.SERIAL_NUMBER||'']'' ' +
' END AS "PARENT", ' +
' PKG_CHEV_EQUIPMENT.LOCATION(ED.SERIAL_NUMBER, EH.DATE_INSTALLED) AS "PARENT_LOCATION", ' +
' EH.ACOMMENT AS "COMMENT", ' +
' EH.DATE_INSTALLED, ' +
' EH.DATE_REMOVED ' +
'FROM EQUIPMENT_HISTORY EH ' +
'INNER JOIN EQUIPMENT_DETAILS ED ON (ED.EQUIPMENT_ID=EH.EQUIPMENT_ID) ' +
'LEFT JOIN EQUIPMENT_DETAILS PED ON (PED.EQUIPMENT_ID=EH.PARENT_EQUIPMENT_ID) ' +
'WHERE EH.EQUIPMENT_ID=:EQUIPMENT_ID ' +
'ORDER BY EH.DATE_INSTALLED ';
on a second thought write your own component make sure that you can link it to a connection/database and test execute each sql. and if you find time you can even use synedit to highlight the sql while editing.
Inifile/xml/json means making the SQL available to the end user - same with unencrypted SQLite, and SQLite is overkill anyway. I vaguely considered dumping a series of text files into a zip file, but again seems overkill.If you want to use an INIFile that has encrypted entries, you can use CryptINI (in OPM and ccr). It can also encrypt/decrypt the whole inifile as well on form.create/close.
I considered TMemo with one line per SQL, won't be a pretty solution though (I prefer my SQLs presented multi-line)
It's easy to implement a TComponent descendant that does what I want, I just didn't want to do spend the time if we we already had something similar in Lazarus CCR. Seeing as how other responses are around implementation detail rather than confirming if the wheel exists, I'll assume there isn't such a component.
Many thanks :-)
see TRxTextHolder in RxFPC. New component at revision 6710.