
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)


