public static bool DeleteGroup(string name, SQLiteConnector conn) { using (var bl = new SQLiteQueryBuilder(Plugin.SQLSafeName)) { bl.Delete(TableDefinition.TableName, new WhereFilter(TableDefinition.ColumnNames.Name, name)); return(((IDataConnector)conn).ExecuteNonQuery(bl) > 0); } }
public static bool DeleteLink(SQLiteConnector conn, long userId, long groupId) { using (var bl = new SQLiteQueryBuilder(Plugin.SQLSafeName)) { bl.Delete(TableDefinition.TableName, new WhereFilter(TableDefinition.ColumnNames.UserId, userId.ToString()), new WhereFilter(TableDefinition.ColumnNames.GroupId, groupId.ToString())); return(((IDataConnector)conn).ExecuteNonQuery(bl) > 0); } }