本文整理汇总了C#中Simple.Data.SimpleExpression类的典型用法代码示例。如果您正苦于以下问题:C# SimpleExpression类的具体用法?C# SimpleExpression怎么用?C# SimpleExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleExpression类属于Simple.Data命名空间,在下文中一共展示了SimpleExpression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: JoinClause
public JoinClause(ObjectReference table, JoinType joinType, SimpleExpression joinExpression)
{
if (table == null) throw new ArgumentNullException("table");
_table = table;
_joinType = joinType;
_joinExpression = joinExpression;
}
示例2: FindOne
internal override IDictionary<string, object> FindOne(string tableName, SimpleExpression criteria)
{
try
{
return _adapter.FindOne(tableName, criteria);
}
catch (NotImplementedException)
{
return Find(tableName, criteria).FirstOrDefault();
}
}
示例3: CreateFindOneDelegate
public virtual Func<object[], IDictionary<string, object>> CreateFindOneDelegate(Adapter adapter, string tableName, SimpleExpression criteria)
{
return adapter.CreateFindOneDelegate(tableName, criteria);
}
示例4: Update
/// <summary>
/// Updates the specified "table" according to specified criteria.
/// </summary><param name="tableName">Name of the table.</param><param name="data">The new values.</param><param name="criteria">The expression to use as criteria for the update operation.</param><returns>The number of records affected by the update operation.</returns>
public override int Update(string tableName, IDictionary<string, object> data, SimpleExpression criteria)
{
return _adapter.Update(tableName, data, criteria);
}
示例5: Delete
public int Delete(string tableName, SimpleExpression criteria, IAdapterTransaction transaction)
{
return Delete(tableName, criteria);
}
示例6: Find
public IEnumerable<IDictionary<string, object>> Find(string tableName, SimpleExpression criteria, IAdapterTransaction transaction)
{
return Find(tableName, criteria);
}
示例7: Delete
internal override int Delete(string tableName, SimpleExpression criteria)
{
return _adapter.Delete(tableName, criteria, AdapterTransaction);
}
示例8: Find
internal override IEnumerable<IDictionary<string, object>> Find(string tableName, SimpleExpression criteria)
{
return _adapter.Find(tableName, criteria, AdapterTransaction);
}
示例9: Update
public override int Update(string tableName, IDictionary<string, object> data, SimpleExpression criteria)
{
int count = 0;
foreach (var record in Find(tableName, criteria))
{
UpdateRecord(data, record);
++count;
}
return count;
}
示例10: JoinClause
public JoinClause(ObjectReference table, SimpleExpression joinExpression)
{
_table = table;
_joinExpression = joinExpression;
}
示例11: Min
public abstract object Min(string tableName, string columnName, SimpleExpression criteria);
示例12: SimpleQueryJoin
public SimpleQueryJoin(ObjectReference table, SimpleExpression joinExpression)
{
_table = table;
_joinExpression = joinExpression;
}
示例13: FindOne
internal abstract IDictionary<string, object> FindOne(string getQualifiedName, SimpleExpression criteriaExpression);
示例14: Upsert
public virtual IDictionary<string, object> Upsert(string tableName, IDictionary<string, object> dict, SimpleExpression criteriaExpression, bool isResultRequired, IAdapterTransaction transaction)
{
var transactionAdapter = this as IAdapterWithTransactions;
if (transactionAdapter == null) throw new NotSupportedException("Transactions are not supported with current adapter.");
if (transactionAdapter.Find(tableName, criteriaExpression, transaction).Any())
{
transactionAdapter.Update(tableName, dict, criteriaExpression, transaction);
return isResultRequired ? transactionAdapter.Find(tableName, criteriaExpression, transaction).FirstOrDefault() : null;
}
return transactionAdapter.Insert(tableName, dict, transaction, isResultRequired);
}
示例15: Find
/// <summary>
/// Finds data from the specified "table".
/// </summary>
/// <param name="tableName">Name of the table.</param>
/// <param name="criteria">The criteria. This may be <c>null</c>, in which case all records should be returned.</param>
/// <returns>The list of records matching the criteria. If no records are found, return an empty list.</returns>
public abstract IEnumerable<IDictionary<string, object>> Find(string tableName, SimpleExpression criteria);