Mercurial > hg > ltpda
view m-toolbox/classes/+utils/@jmysql/getRepositoryVersion.m @ 1:2014ba5b353a database-connection-manager
Remove old code
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Sat, 03 Dec 2011 18:13:55 +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.jmysql.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.2 2009/08/11 12:33:19 ingo Exp $ % function ver = getRepositoryVersion(conn) ver = '2.0'; q = ['describe ' char(conn.getDatabase) '.objs']; results = conn.query(q); fields = {}; while results.next fields = [fields {char(results.getString(1))}]; end if utils.helper.ismember('uuid', fields) ver = '2.1'; end end