Jump to content

KDb/Drivers/Loopback: Difference between revisions

From KDE Community Wiki
Jstaniek (talk | contribs)
No edit summary
Jstaniek (talk | contribs)
No edit summary
Line 4: Line 4:
  status: idea and some design, volunteers needed
  status: idea and some design, volunteers needed


It's a higher-level driver that performs introspection into plugged-in data sources and returns available information in a form of db views.
__TOC__
 
The Loopback driver is a higher-level driver that performs introspection into plugged-in data sources and returns available information in a form of db views.


== Example ==  
== Example ==  

Revision as of 20:51, 6 April 2023

Design document

started: may 2005 by jstaniek
status: idea and some design, volunteers needed

The Loopback driver is a higher-level driver that performs introspection into plugged-in data sources and returns available information in a form of db views.

Example

Most important db views can look like the Schema Table of SQLite https://sqlite.org/schematab.html

CREATE TABLE sqlite_schema(
 type text,
 name text,
 tbl_name text,
 rootpage integer,
 sql text
);

Then, you can perform SELECT queries on the table.

Why?

This feature gives the overview of database objects and fields, eg. for creating a design report without a need for custom coding. As a consequence, e.g. KEXI can display data from this table as from any other tables, if this KDb driver is accessible.

We also get alternative way for schema introspection: by running a query, like:

SELECT * FROM TABLES WHERE name="foobar"

instead of using the KDb API (pseudocode):

KDbConnection::tableSchema("foobar")