Sqlite syntax

F

firephreek

Is there some documentation out there that actually lists the Sqlite
syntax?
Or even better, one that crosses over and talks about how it works with
python?

Sqlite seems quite the nifty little thing, but for some reason, I can't
seem to get a list of tables in my databases through a python prompt.

Help?

And since the databases aren't 'centralized' there's no way of knowing
what databases I have floating around is there?

Stryder
 
D

David M. Cooke

firephreek said:
Is there some documentation out there that actually lists the Sqlite
syntax?

You mean the SQL dialect it speaks? http://sqlite.org/lang.html
Or even better, one that crosses over and talks about how it works with
python?

Like all the other DB interfaces. See the pysqlite homepage for specifics.
Sqlite seems quite the nifty little thing, but for some reason, I can't
seem to get a list of tables in my databases through a python
prompt.

From http://sqlite.org/lang.html#createtable, all the tables are
listed in the sqlite_master table, so
[('table', 'TEST', 'TEST', 3, 'CREATE TABLE TEST (V VARCHAR, I INTEGER)')]
And since the databases aren't 'centralized' there's no way of knowing
what databases I have floating around is there?

Use 'ls' :). Each database is a separate file.
 
F

Frithiof Andreas Jensen

Is there some documentation out there that actually lists the Sqlite
syntax?

http://sqlite.org/lang.html
Or even better, one that crosses over and talks about how it works with
python?

That be mainly here: http://www.python.org/topics/database/ under
http://www.python.org/peps/pep-0249.html
And since the databases aren't 'centralized' there's no way of knowing
what databases I have floating around is there?

It is "lite" - which means that you have to remember where you put stuff ;-)
A ConfigParser object is a good place to keep track of that sort of thing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,201
Messages
2,571,048
Members
47,647
Latest member
NelleMacy9

Latest Threads

Top