Mercurial > hg > ltpda
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/test/test_jmysql/test1.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,61 @@ + +mc + +%% Various tests + + +conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); + +q = 'select * from objmeta'; + +[resultSet, cols] = utils.jmysql.query(conn, q); + +[results, cols] = utils.jmysql.resultsToCell(resultSet); + +utils.jmysql.displayResults(resultSet, q); + +utils.jmysql.queryDialog(conn) + +%% Close connection + +conn.closeConnection + +%% Show query builder + +utils.jmysql.queryDialog() + +%% Converters + +conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); + +dbconn = utils.jmysql.jconnTodbconn(conn) + +conn.closeConnection + +jconn = utils.jmysql.dbconnTojconn(dbconn) + +close(dbconn) + +jconn.closeConnection + +%% Show submit dialog + +sinfo = utils.jmysql.submitDialog +close(sinfo.conn) + +%% Show submit dialog with a valid connection + +conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); +sinfo = utils.jmysql.submitDialog(conn) +conn.closeConnection +close(sinfo.conn) + +%% Show submit dialog with an input sinfo + +conn = utils.jmysql.connect('localhost', 'ltpda_test', 'hewitson', 'asd'); +sinfo = utils.jmysql.submitDialog(conn) +sinfo = utils.jmysql.submitDialog(conn, sinfo) +conn.closeConnection +close(sinfo.conn) + +