Esempio n. 1
0
 public string SelectQuery()
 {
     return(@" SELECT " +
            ColumnInfos.Aggregate(@"", (ret, item) => ret + item.SelectColumnName()) +
            @", rowid FROM " +
            TableName);
 }
Esempio n. 2
0
        public string InsertQuery()
        {
            var query = @" INSERT " +
                        @" INTO " +
                        TableName +
                        @" ( " +
                        ColumnInfos.Aggregate(@"", (ret, item) => ret + item.InsertColumnName()) +
                        @" ) VALUES ( " +
                        ColumnInfos.Aggregate(@"", (ret, item) => ret + item.InsertColumnValue()) +
                        @" ) ";

            if (HasBlob)
            {
                query += @"; SELECT last_insert_rowid(); ";
            }

            return(query);
        }