comparison m-toolbox/classes/+utils/@mysql/getRepositoryVersion.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % getRepositoryVersion tries to get the version of the repository by
2 % inspecting various fields in the database.
3 %
4 % ver = utils.mysql.getRepositoryVersion(conn)
5 %
6 % Rules:
7 % objs table contains field 'uuid' => ver = 2.1
8 %
9 % else: ver = 2.0;
10 %
11 % M Hewitson 11-08-09
12 %
13 % $Id: getRepositoryVersion.m,v 1.3 2010/01/22 12:46:08 ingo Exp $
14 %
15
16 function ver = getRepositoryVersion(conn)
17
18 error('### Obsolete as of LTPDA version 2.2. Replaced my the utils class jmysql (utils.jmysql.%s)', mfilename());
19 ver = '2.0';
20
21 q = ['describe ' conn.Instance '.objs'];
22 curs = exec(conn, q);
23 curs = fetch(curs);
24
25 if utils.helper.ismember('uuid', curs.Data(:,1))
26 ver = '2.1';
27 end
28
29
30 end
31