-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hans Olav Loftum
committed
Feb 19, 2012
1 parent
46f3d00
commit 22269fe
Showing
27 changed files
with
35,953 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
DbTool/DbTool.Lib/Communication/DbCommands/Dynamic/DynamicQuery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System.Collections.Generic; | ||
using System.Data.Common; | ||
using DbTool.Lib.Configuration; | ||
|
||
namespace DbTool.Lib.Communication.DbCommands.Dynamic | ||
{ | ||
public class DynamicQuery | ||
{ | ||
private ConnectionData _connectionData; | ||
public ConnectionData ConnectionData | ||
{ | ||
get { return _connectionData; } | ||
set | ||
{ | ||
_connectionData = value; | ||
_sqlQuery.ConnectionData = _connectionData; | ||
} | ||
} | ||
|
||
private DbConnection _dbConnection; | ||
public DbConnection DbConnection | ||
{ | ||
get { return _dbConnection; } | ||
set | ||
{ | ||
_dbConnection = value; | ||
_sqlQuery.DbConnection = _dbConnection; | ||
} | ||
} | ||
|
||
private readonly DynamicSqlQuery _sqlQuery; | ||
|
||
public DynamicQuery() | ||
{ | ||
_sqlQuery = new DynamicSqlQuery(); | ||
} | ||
|
||
public IEnumerable<dynamic> Schema(string collection) | ||
{ | ||
return _sqlQuery.Schema(collection); | ||
} | ||
|
||
public IEnumerable<dynamic> Query(string sql) | ||
{ | ||
return _sqlQuery.Query(sql); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.