Trees | Indices | Help |
---|
|
Helper functions to create SQL statements.
License: GPL
To Do:SELECT COUNT(samplename) AS count FROM \ (SELECT DISTINCT(samplename) AS samplename FROM \ ams WHERE corenum=1 AND coretype='p');
Author: Kurt Schwehr
Version: 6398
Copyright: 2006
Date: 2007-06-20
|
|||
select Construct an sql select query |
|||
create Helper for building create SQL commands. |
|||
insert Help create an SQL insert statement for injecting data into a database. |
|
|||
|
|||
|
|||
str |
|
|
|||
BOMBASTIC = 4
|
|||
VERBOSE = 3
|
|||
TRACE = 2
|
|||
TERSE = 1
|
|||
ALWAYS = 0
|
|||
NEVER = 0
|
|
Convert a UTC sec time to a SQL timestamp >>> sec2timestamp(int(1169703371)) '2007-01-25 05:36:11' |
Take a list and make an insert string. This works with dictionaries too. Here is a quick example: >>> aList = [('one',1),('2','two'),('threepoint',3.)] >>> sqlInsertStrFromList('myTable',aList,dbType='sqlite') "insert into myTable (one,2,threepoint) values (1,'two',3.0);" >>> sqlInsertStrFromList('myTable',aList) "insert into mytable (one,2,threepoint) values (1,'two',3.0);"
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat Feb 9 07:33:15 2008 | http://epydoc.sourceforge.net |