public int Count(DatabaseTableExpression expression) { return(DoCommand(delegate(SQLiteCommand command) { command.CommandText = expression.BuildCount(this, command.Parameters); return command.ExecuteScalar().Convert <int>(); })); }
public IEnumerable <DatabaseTableRow> Retrieve(DatabaseTableExpression expression) { return(DoCommand(delegate(SQLiteCommand command) { command.CommandText = expression.BuildSelect(this, command.Parameters); List <DatabaseTableRow> rows = new List <DatabaseTableRow>(); using (SQLiteDataReader reader = command.ExecuteReader()) { while (reader.Read()) { rows.Add(new DatabaseTableRow(reader, this)); } } return rows; })); }
static public DatabaseTableExpression NotEqualsExpression(this DatabaseTableExpression item, DatabaseTableExpression expression) { return(new DatabaseTableExpression_Operation_Binary_NotEquals(item, expression)); }
static public DatabaseTableExpression ContainsExpression(this DatabaseTableExpression item, DatabaseTableExpression expression) { return(new DatabaseTableExpression_Operation_Binary_Contains(item, expression)); }
static public DatabaseTableExpression ContainsExpression(this DatabaseTableField item, DatabaseTableExpression expression) { return(item.GetExpression().ContainsExpression(expression)); }
public DatabaseTableExpression_Operation_Binary_LogicalOr(DatabaseTableExpression l, DatabaseTableExpression r) : base("?LEFT OR ?RIGHT", l, r) { }
static public DatabaseTableExpression NotEqualsExpression(this DatabaseTableField item, DatabaseTableExpression expression) { return(item.GetExpression().NotEqualsExpression(expression)); }
public DatabaseTableExpression_Operation_Binary_Multiply(DatabaseTableExpression l, DatabaseTableExpression r) : base("?LEFT * ?RIGHT", l, r) { }
public DatabaseTableExpression_Operation_Binary_Divide(DatabaseTableExpression l, DatabaseTableExpression r) : base("?LEFT / ?RIGHT", l, r) { }
public DatabaseTableExpression_Operation_Binary_Subtract(DatabaseTableExpression l, DatabaseTableExpression r) : base("?LEFT - ?RIGHT", l, r) { }
public DatabaseTableExpression_Operation_Binary_Add(DatabaseTableExpression l, DatabaseTableExpression r) : base("?LEFT + ?RIGHT", l, r) { }
public DatabaseTableExpression_Operation_Binary_Contains(DatabaseTableExpression l, DatabaseTableExpression r) : base("?LEFT LIKE '%'||?RIGHT||'%'", l, r) { }
public DatabaseTableExpression_Operation_Binary_NotEquals(DatabaseTableExpression l, DatabaseTableExpression r) : base("?LEFT != ?RIGHT", l, r) { }
public DatabaseTableExpression_Operation_Binary(string lo, DatabaseTableExpression l, DatabaseTableExpression r) : base(lo) { left = l; right = r; }