Mercurial > hg > ltpda
view m-toolbox/classes/+utils/@mysql/getRepositoryVersion.m @ 44:409a22968d5e default
Add unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 18:42:11 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% getRepositoryVersion tries to get the version of the repository by % inspecting various fields in the database. % % ver = utils.mysql.getRepositoryVersion(conn) % % Rules: % objs table contains field 'uuid' => ver = 2.1 % % else: ver = 2.0; % % M Hewitson 11-08-09 % % $Id: getRepositoryVersion.m,v 1.3 2010/01/22 12:46:08 ingo Exp $ % function ver = getRepositoryVersion(conn) error('### Obsolete as of LTPDA version 2.2. Replaced my the utils class jmysql (utils.jmysql.%s)', mfilename()); ver = '2.0'; q = ['describe ' conn.Instance '.objs']; curs = exec(conn, q); curs = fetch(curs); if utils.helper.ismember('uuid', curs.Data(:,1)) ver = '2.1'; end end