mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
added marr.datamapper source code for easy debugging.
This commit is contained in:
parent
58a05fcef8
commit
3cdff3bb71
96 changed files with 9198 additions and 363 deletions
33
Marr.Data/QGen/DeleteQuery.cs
Normal file
33
Marr.Data/QGen/DeleteQuery.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Marr.Data.Mapping;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace Marr.Data.QGen
|
||||
{
|
||||
/// <summary>
|
||||
/// This class creates a SQL delete query.
|
||||
/// </summary>
|
||||
public class DeleteQuery : IQuery
|
||||
{
|
||||
protected Table TargetTable { get; set; }
|
||||
protected string WhereClause { get; set; }
|
||||
protected Dialects.Dialect Dialect { get; set; }
|
||||
|
||||
public DeleteQuery(Dialects.Dialect dialect, Table targetTable, string whereClause)
|
||||
{
|
||||
Dialect = dialect;
|
||||
TargetTable = targetTable;
|
||||
WhereClause = whereClause;
|
||||
}
|
||||
|
||||
public string Generate()
|
||||
{
|
||||
return string.Format("DELETE FROM {0} {1} ",
|
||||
Dialect.CreateToken(TargetTable.Name),
|
||||
WhereClause);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue