Mercurial > hg > ltpda
view m-toolbox/classes/+utils/@jmysql/connect.m @ 51:9d5c88356247 database-connection-manager
Make unit tests database connection parameters configurable
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:37 +0100 |
parents | 91f21a0aab35 |
children |
line wrap: on
line source
% CONNECT Connects to an LTPDA repository and returns the connection object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: Connects to an LTPDA repository and returns the connection % object. The provided credentials are stored in a persistent utility, and % reused when a connection to the same database and server is requested. % % If credentials for the requested database and server are not given, and are % not in the utility, the user is prompted for the missing informations. % Credentials are set to expire and to be entered again after a time defined % in the LTPDA user preferences. % % CALL: conn = connect(hostname) % conn = connect(hostname, database) % conn = connect(hostname, database, username, password) % % VERSION: $Id: connect.m,v 1.13 2011/04/01 08:36:49 hewitson Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function conn = connect(varargin) conn = LTPDADatabaseConnectionManager().connect(varargin{:}); end