DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Static Public Member Functions | List of all members
Deveel.Data.Client.DatabaseExtensions Class Reference

Static Public Member Functions

static IDbConnection CreateDbConnection (this IDatabase database, string userName, string password)
 

Detailed Description

Definition at line 24 of file DatabaseExtensions.cs.

Member Function Documentation

static IDbConnection Deveel.Data.Client.DatabaseExtensions.CreateDbConnection ( this IDatabase  database,
string  userName,
string  password 
)
inlinestatic

Definition at line 25 of file DatabaseExtensions.cs.

25  {
26  if (database == null)
27  throw new ArgumentNullException("database");
28 
29  var dbHandler = database.Context.SystemContext as IDatabaseHandler;
30  if (dbHandler == null)
31  dbHandler = new SingleDatabaseHandler(database);
32 
33  var serverConnector = new EmbeddedServerConnector(dbHandler);
34  var clientConnector = new EmbeddedClientConnector(serverConnector);
35 
36  var settings = new DeveelDbConnectionStringBuilder {
37  UserName = userName,
38  Password = password,
39  Database = database.Name
40  };
41 
42  return new DeveelDbConnection(clientConnector, settings);
43  }
This is a plain-text password defined by the user.
The default implementation of a database in a system.
Definition: Database.cs:38
string Name
Gets the database name, as configured in the parent context.
Definition: Database.cs:77

The documentation for this class was generated from the following file: