[fpc-pascal] Re: GetTableNames in TSQLConnection / Postgresql
Reinier Olislagers
reinierolislagers at gmail.com
Fri Dec 21 11:59:20 CET 2012
On 18-12-2012 10:49, Tomas Hajny wrote:
> On Tue, December 18, 2012 09:35, michael.vancanneyt-0Is9KJ9Sb0A at public.gmane.org wrote:
>> On Tue, 18 Dec 2012, John wrote:
>>> you can't! That brings me back to the original point that either
>>> gettablenames has to operate on a known schema only (so you can supply
>>> the
>>> schema afterwards), or it has to supply the schema with the table name.
>>
>> I would opt for the latter, hence the soPrependSchemaName.
>
> Isn't something like a FullTableName property/method (connection-specific)
> a better solution (more universal, also catering for differences in
> construction of the full name with different database engines)?
No, because then you won't be able to get metadata using the same
mechanism for all connections.
If we create a FullTableName method (or property, with corresponding
tablenames collection etc), we should do the same for stored procedures,
views, and any other object a db supports.
Switching dbs would then be very problematic.
The current mechanism has the advantage that it is extendable for
various dbs without too much effort... and is like other mechanisms
(e.g. the ADO.Net method of doing things).
More information about the fpc-pascal
mailing list