Skip to content

Commit b285b33

Browse files
committed
change definition of id column on test table
1 parent 194974a commit b285b33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/homePage/example.d

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ void main(string[] args)
1111
Connection conn = new Connection(connectionStr);
1212
scope(exit) conn.close();
1313

14-
// Create the schema
14+
// Create the schema (Would rather have `id` INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT but for now just get tests working)
1515
conn.exec("CREATE TABLE IF NOT EXISTS `tablename` (
16-
`id` INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
16+
`id` INTEGER,
1717
`name` VARCHAR(250)
1818
)");
1919

@@ -57,6 +57,7 @@ void main(string[] args)
5757
conn.exec(
5858
"INSERT INTO `tablename` (`id`, `name`) VALUES (?,?)",
5959
null, "Cam"); // Can also take Nullable!T
60+
6061
range = conn.query("SELECT * FROM `tablename` WHERE `name`='Cam'");
6162
assert( range.front[0].type == typeid(typeof(null)) );
6263
}

0 commit comments

Comments
 (0)