[fpc-pascal] Re: SQLDB GetSchemaInfoSQL for indexes etc?

Reinier Olislagers reinierolislagers at gmail.com
Thu Apr 19 09:55:31 CEST 2012


On 19-4-2012 9:41, michael.vancanneyt-0Is9KJ9Sb0A at public.gmane.org wrote:
> On Thu, 19 Apr 2012, Reinier Olislagers wrote:
>> Plans
>> =====
>> I'll focus on getting lazdatadesktop/datadict support for MSSQL/Sybase
>> running first; afterwards we can look at the things we can add for other
>> databases and functionality (e.g. just getting a list of tables instead
>> of always having to run queries might be nice functionality).
> 
> Getting a list of tables is already part of TSQLConnection ?
Mmm yes... you're right: GetTableNames, GetProcedureNames, GetFieldNames
are already there.
As Lacak mentioned though:
GetIndexNames, GetPackageNames, GetProcedureParams
http://docwiki.embarcadero.com/VCL/XE2/en/SqlExpr.TSQLConnection_Functions

>> Because documentation is lacking, I propose annotating sqldb.pp to the
>> effect that the Interbase/Firebird implementation is the reference
>> implementation.
>> Then in the GetSchemaInfoSQL function in  ibconnection.pp, indicate what
>> the queries do, and what they return (refer to column names being
>> similar or the same as information_schema in SQL ISO standard, but has
>> deviations).
> 
> It might be better to put this in a README file in the sqldb directory.
> 
> Cluttering the source with documentation is not done. (well, not in FPC)
... thanks for the gentle reminder there ARE other ways out there ;)
I hear & obey ;)

Not that it won't be slightly ridiculous to refer to ibconnection.pp in
the readme but well... better some documentation than none...
Actually, if I can get a sensible patch into the fpdocs XML file, I'll
do that... at least there will be some use for normal end users so they
know more or less what the function is actually supposed to be used for....

Thanks,
Reinier



More information about the fpc-pascal mailing list