开发者

determine schema field type in SQLite, CSV, or Excel

开发者 https://www.devze.com 2022-12-12 18:10 出处:网络
I am working on an Cocoa project using SQL databases, or CSV/Excel files as the input.开发者_如何学编程

I am working on an Cocoa project using SQL databases, or CSV/Excel files as the input.

开发者_如何学编程

Right now, I have hard-coded the SQL schema for the SQLie files I am importing (For example, the program would know that the first column is a STRING, second column is a INT... etc.). I am wondering if there's any C or Objective-C library or method to automatically identify the field type?


You can query the database what it's schema is in sqlite(3)

http://www.sqlite.org/pragma.html

Search for "Pragmas to query the database schema"

0

精彩评论

暂无评论...
验证码 换一张
取 消