[GRASS-dev] SQLite driver problem
Glynn Clements
glynn at gclements.plus.com
Tue Dec 14 19:00:05 EST 2010
Moritz Lennert wrote:
> >> s/db.execute/db.select
> >
> > Cool.
> >
> > But I thought that both did essentially the same job? Apparently not...
>
> No, db.select is only for selection and db.execute is for any other db
> manipulations (update, delete, insert, create table, etc). They use
> different functions to interact with the DB. Don't know what Radim's
> reasoning was behind this, but I guess he had a good one :-).
A select command returns data; the others return only a status
indication. This is typically reflected in the underlying API (libpq,
sqlite, etc) having different interfaces for queries (select
statements) and other statements.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list