Mercurial > hg > ltpda
view m-toolbox/test/test_jmysql/test1.m @ 49:0bcdf74587d1 database-connection-manager
Cleanup
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:36 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
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)