Mercurial > hg > ltpda
comparison m-toolbox/test/test_jmysql/test1.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 | |
2 mc | |
3 | |
4 %% Various tests | |
5 | |
6 | |
7 conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); | |
8 | |
9 q = 'select * from objmeta'; | |
10 | |
11 [resultSet, cols] = utils.jmysql.query(conn, q); | |
12 | |
13 [results, cols] = utils.jmysql.resultsToCell(resultSet); | |
14 | |
15 utils.jmysql.displayResults(resultSet, q); | |
16 | |
17 utils.jmysql.queryDialog(conn) | |
18 | |
19 %% Close connection | |
20 | |
21 conn.closeConnection | |
22 | |
23 %% Show query builder | |
24 | |
25 utils.jmysql.queryDialog() | |
26 | |
27 %% Converters | |
28 | |
29 conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); | |
30 | |
31 dbconn = utils.jmysql.jconnTodbconn(conn) | |
32 | |
33 conn.closeConnection | |
34 | |
35 jconn = utils.jmysql.dbconnTojconn(dbconn) | |
36 | |
37 close(dbconn) | |
38 | |
39 jconn.closeConnection | |
40 | |
41 %% Show submit dialog | |
42 | |
43 sinfo = utils.jmysql.submitDialog | |
44 close(sinfo.conn) | |
45 | |
46 %% Show submit dialog with a valid connection | |
47 | |
48 conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); | |
49 sinfo = utils.jmysql.submitDialog(conn) | |
50 conn.closeConnection | |
51 close(sinfo.conn) | |
52 | |
53 %% Show submit dialog with an input sinfo | |
54 | |
55 conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); | |
56 sinfo = utils.jmysql.submitDialog(conn) | |
57 sinfo = utils.jmysql.submitDialog(conn, sinfo) | |
58 conn.closeConnection | |
59 close(sinfo.conn) | |
60 | |
61 |