Mercurial > hg > ltpda
comparison m-toolbox/classes/+utils/@mysql/mysql.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 % MYSQL class for tools to manipulate the current object/figure/axis. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: MYSQL class for tools to manipulate the current | |
5 % object/figure/axis. | |
6 % | |
7 % MYSQL METHODS: | |
8 % | |
9 % Static methods: | |
10 % yticks - Set the input vector as the y-ticks of the current axis | |
11 % %%% GENERAL TOOLS | |
12 % logindlg - creates a login dialog box. | |
13 % dbquery - query an AO repository database. | |
14 % getAOsInTimeSpan - performs high-level queries to retrieve AOs from | |
15 % a LTPDA repository. | |
16 % insert - inserts values into a single row of a table using | |
17 % JDBC driver specified by the input connection. | |
18 % | |
19 % %%% MYSQL TOOLS | |
20 % connect - connects to an LTPDA repository and returns | |
21 % the connection object. | |
22 % getMaxId - get the maximum Id from the objs table. | |
23 % getMD5hash - gets the md5 hash string of a given object ID. | |
24 % getObjIds - gets a list of object ids from a given collection id. | |
25 % getObjType - gets the object type associated with the given object id. | |
26 % getUserID - gets the user ID number corresponding to the given | |
27 % user name. | |
28 % getXdoc - retrieves an object with given id from the | |
29 % LTPDA repository | |
30 % | |
31 % HELP: To see the available static methods, call | |
32 % >> methods utils.mysql | |
33 % | |
34 % HISTORY: 26-05-2008 Diepholz | |
35 % Creation | |
36 % | |
37 % VERSION: $Id: mysql.m,v 1.3 2009/08/11 12:02:46 hewitson Exp $ | |
38 % | |
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
40 | |
41 classdef mysql | |
42 | |
43 %------------------------------------------------ | |
44 %--------- Declaration of Static methods -------- | |
45 %------------------------------------------------ | |
46 methods (Static) | |
47 | |
48 %------------------------------------------------------------- | |
49 % List other methods | |
50 %------------------------------------------------------------- | |
51 | |
52 %%% GENERAL TOOLS | |
53 varargout = getsinfo(varargin) % return sinfo structure of repository object | |
54 varargout = logindlg(varargin) % creates a login dialog box. | |
55 varargout = dbquery(varargin) % query an AO repository database. | |
56 varargout = getAOsInTimeSpan(varargin) % performs high-level queries to retrieve AOs from an LTPDA repository. | |
57 message = insert(conn, table, varargin) % inserts values into a single row of a table using JDBC driver specified by the input connection. | |
58 varargout = getRepositoryVersion(varargin); | |
59 | |
60 | |
61 %%% MYSQL TOOLS | |
62 varargout = connect(varargin) % connects to an LTPDA repository and returns the connection object. | |
63 id = getMaxId(conn) % get the maximum Id from the objs table. | |
64 h = getMD5hash(conn, id) % gets the md5 hash string of a given object ID. | |
65 ids = getObjIds(conn, cid) % gets a list of object ids from a given collection id. | |
66 type = getObjType(conn, id) % gets the object type associated with the given object id. | |
67 [userid,dbuser] = getUserID(conn, username) % gets the user ID number corresponding to the given user name. | |
68 xdoc = getXdoc(conn, id) % retrieves an object with given id from the LTPDA repository | |
69 | |
70 end % End static methods | |
71 | |
72 end | |
73 |