iOS 表格 SQLFetchedResultsController

码农软件 · 软件分类 · 列表(Table) · 2019-05-25 10:27:08

软件介绍

SQLFetchedResultsController 可以让使用 SQLite 建立表格更加容易。对于那些喜欢 SQL 的灵活性,又不想放弃可以轻松建立表格的 Core Data's NSFetchedResultsController 的开发者,可以试试这个类。

作者注:这个脚本正在开发中,还不能保证总是正确的显示列表。

 override func viewDidLoad() {
        super.viewDidLoad()

        var request = SQLFetchRequest()
        request.table = "Test as t" //Not tested with > 1 table
        request.fields = ["id","title", "(SELECT AVG(id) FROM Test WHERE title=t.title) as idAvg"]
        request.predicate = "id % 10 = 0 AND title != 'SomeString'"
        request.sortDescriptors = [(key:"title", isASC:true)]
        request.groupBy = "title"
        request.having = "count(*) > 3"
        fetchController = SQLFetchedResultsController(request: request, pathToDatabase: DatabaseSetup.getDatabasePath())

        let preview = fetchController!.previewSQL()
        println("--SQL Preview: \(preview.SQL) \n--Parameters: \(preview.Parameters)")
    }

本文地址:https://www.codercto.com/soft/d/6502.html

Introduction to Graph Theory

Introduction to Graph Theory

Douglas B. West / Prentice Hall / 2000-9-1 / USD 140.00

For undergraduate or graduate courses in Graph Theory in departments of mathematics or computer science. This text offers a comprehensive and coherent introduction to the fundamental topics of graph ......一起来看看 《Introduction to Graph Theory》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具