Mercurial > hg > ltpda
annotate m-toolbox/classes/+utils/@jmysql/connect.m @ 52:daf4eab1a51e database-connection-manager tip
Fix. Default password should be [] not an empty string
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:29:47 +0100 |
parents | 91f21a0aab35 |
children |
rev | line source |
---|---|
0 | 1 % CONNECT Connects to an LTPDA repository and returns the connection object. |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: Connects to an LTPDA repository and returns the connection | |
5 % object. The provided credentials are stored in a persistent utility, and | |
6 % reused when a connection to the same database and server is requested. | |
7 % | |
8 % If credentials for the requested database and server are not given, and are | |
9 % not in the utility, the user is prompted for the missing informations. | |
10 % Credentials are set to expire and to be entered again after a time defined | |
11 % in the LTPDA user preferences. | |
12 % | |
13 % CALL: conn = connect(hostname) | |
16
91f21a0aab35
Update utils.jquery
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
0
diff
changeset
|
14 % conn = connect(hostname, database) |
91f21a0aab35
Update utils.jquery
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
0
diff
changeset
|
15 % conn = connect(hostname, database, username, password) |
0 | 16 % |
17 % VERSION: $Id: connect.m,v 1.13 2011/04/01 08:36:49 hewitson Exp $ | |
18 % | |
19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
20 | |
16
91f21a0aab35
Update utils.jquery
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
0
diff
changeset
|
21 function conn = connect(varargin) |
91f21a0aab35
Update utils.jquery
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
0
diff
changeset
|
22 |
91f21a0aab35
Update utils.jquery
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
0
diff
changeset
|
23 conn = LTPDADatabaseConnectionManager().connect(varargin{:}); |
0 | 24 |
25 end |