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

前端之家收集整理的这篇文章主要介绍了为什么有些SQLite函数从零开始,有些基于一个前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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已经存在了一段时间……

猜你在找的Sqlite相关文章