【问题标题】:Sqlite Swift Create and Run QuerySqlite Swift 创建和运行查询
【发布时间】:2017-06-18 13:56:29
【问题描述】:

我有一个这样的查询:

let query = devices.select(assetTag)
                .order(assetTag.desc)
                .limit(5, offset: 1)

我只是不知道使用哪个函数来运行它。我是这样运行的吗:

db.execute(query)

【问题讨论】:

    标签: ios swift sqlite.swift


    【解决方案1】:

    答案如下:

     let results = try! db.prepare(query)
    
                for items in results
                {
                print (items)
    
                }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多