sqlobject.tests.test_auto module¶
-
class
sqlobject.tests.test_auto.
Person
(**kw)[source]¶ Bases:
sqlobject.main.SQLObject
-
j
= person¶
-
name
¶
-
q
= person¶
-
-
class
sqlobject.tests.test_auto.
Phone
(**kw)[source]¶ Bases:
sqlobject.main.SQLObject
-
j
= phone¶
-
phone
¶
-
q
= phone¶
-
-
class
sqlobject.tests.test_auto.
TestAuto
[source]¶ -
mssqlCreate
= "\n CREATE TABLE auto_test (\n auto_id int identity(1,1),\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT 0,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun BIT default(0) NOT NULL\n )\n "¶
-
mssqlDrop
= '\n DROP TABLE auto_test\n '¶
-
mysqlCreate
= "\n CREATE TABLE IF NOT EXISTS auto_test (\n auto_id INT AUTO_INCREMENT PRIMARY KEY,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT NULL,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun TINYINT DEFAULT 0 NOT NULL\n )\n "¶
-
mysqlDrop
= '\n DROP TABLE IF EXISTS auto_test\n '¶
-
postgresCreate
= "\n CREATE TABLE auto_test (\n auto_id SERIAL PRIMARY KEY,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT 0,\n created TIMESTAMP NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun BOOL DEFAULT FALSE NOT NULL\n )\n "¶
-
postgresDrop
= '\n DROP TABLE auto_test\n '¶
-
sqliteCreate
= "\n CREATE TABLE auto_test (\n auto_id INTEGER PRIMARY KEY AUTOINCREMENT ,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT NULL,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun INT DEFAULT 0 NOT NULL\n )\n "¶
-
sqliteDrop
= '\n DROP TABLE auto_test\n '¶
-
sybaseCreate
= "\n CREATE TABLE auto_test (\n auto_id integer,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT 0,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun BIT default(0) NOT NULL\n )\n "¶
-
sybaseDrop
= '\n DROP TABLE auto_test\n '¶
-
-
sqlobject.tests.test_auto.
now
()¶ [tz] -> new datetime with tz’s local day and time.