加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

为什么有些SQLite函数从零开始,有些基于一个

发布时间:2020-12-12 23:43:45 所属栏目:百科 来源:网络整理
导读:sqlite3_column_* 的索引参数从零开始,而 sqlite3_bind_* 是从1开始的. 是否有一个原因? 我懂了. 责备sqlite3_bind_parameter_index: Return the index of an SQL parameter given its name. The index value returned is suitable for use as the second
sqlite3_column_*的索引参数从零开始,而 sqlite3_bind_*是从1开始的.

是否有一个原因?

我懂了.

责备sqlite3_bind_parameter_index:

Return the index of an SQL parameter given its name. The index value returned is suitable for use as the second parameter to sqlite3_bind(). A zero is returned if no matching parameter is found.

你去吧奇怪的选择,考虑到他们似乎使用了一个signed int作为索引,这意味着他们可以使用-1来表示不匹配.也许背后的原因更具历史性,SQLite已经存在了一段时间……

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读