Example #1
0
 /// <summary>
 /// initialize new instance of <see cref="SQLiteTableColumn"/> with one column
 /// </summary>
 /// <param name="column">the column that will be used for sorting</param>
 /// <param name="orderByWay">the way to oder</param>
 public OrderBy(SQLiteTableColumn column, OrderByWay orderByWay)
 {
     if (column == null)
     {
         throw new ArgumentNullException(nameof(column));
     }
     Add(column);
     OrderByWay = orderByWay;
 }
Example #2
0
 /// <summary>
 /// make query for Read the Data From the DataBase by condition and the result will be one column
 /// </summary>
 /// <typeparam name="TCondition"> class or struct contain
 /// properties of type <see cref="ColumnValue{T}" />
 /// the name of the properties as the names of the table columns</typeparam>
 /// <param name="condition">the object that will be used for making conditions</param>
 /// <param name="conditionRelationShip">the relationship between the parts of the condition</param>
 /// <param name="column"> the column that will be returned </param>
 /// <param name="orderByWay">instance of <see cref="OrderByWay"/> for order the result </param>
 /// <returns></returns>
 public string Read <TCondition>(TCondition condition, ConditionRelationShip conditionRelationShip,
                                 ref SQLiteTableColumn column,
                                 OrderByWay orderByWay) =>
 $"{Read(ref column)}{QueryCondition(condition, conditionRelationShip)}{new OrderBy(column, orderByWay)}";
Example #3
0
 /// <summary>
 /// make query for Read one column From the Table
 /// </summary>
 /// <param name="tableColumn">the column that will be returned </param>
 /// <param name="orderByWay"></param>
 /// <returns>query for Read All the Data From the Table</returns>
 public string Read(ref SQLiteTableColumn tableColumn, OrderByWay orderByWay) =>
 $"{Read(ref tableColumn)}{new OrderBy(tableColumn, orderByWay)}";
Example #4
0
 /// <summary>
 /// make query for Read the Data From the DataBase by condition and the result will be one column
 /// </summary>
 /// <typeparam name="TCondition"> class or struct contain
 /// properties of type <see cref="ColumnValue{T}" />
 /// the name of the properties as the names of the table columns</typeparam>
 /// <param name="condition">the object that will be used for making conditions</param>
 /// <param name="conditionRelationShip">the relationship between the parts of the condition</param>
 /// <param name="column"> the column that will be returned </param>
 /// <returns></returns>
 public string Read <TCondition>(TCondition condition, ConditionRelationShip conditionRelationShip,
                                 ref SQLiteTableColumn column) => $"{Read(ref column)}{QueryCondition(condition, conditionRelationShip)}";
Example #5
0
 /// <summary>
 /// make query for Read All the Data From the Table
 /// </summary>
 /// <param name="tableColumn">the column that will be returned </param>
 /// <returns>query for Read All the Data From the Table</returns>
 public string Read(ref SQLiteTableColumn tableColumn) => $"select {tableColumn} from {Table} ";