内部类型(internal type)
请求类型 (requested type)
转化(conversion)
null
integer
值为 0
float
值为 0.0
text
值为 null指针
blob
从integer 转化为float
从 integer渲染成ascii
跟 integer->text转换过程一样
从float 转化为integer
从 float渲染成ascii
跟float->text转换过程一样
使用 atoi()
使用 atof()
不做改变
转化为text 然后使用 atoi()
转化为text 然后使用 atof()
如果需要的话,添加0作为终结符
上表引用c函数库的atoi() 和atof()。实际上,sqlite不会使用这些函数,sqlite有自己跟这些函数等价的转换函数。使用atoi() 和atof()是为了让上表更简短,因为大部分的c程序员对他们都很熟悉。
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
转载:http://www.cnblogs.com/kissazi2/p/3162185.html