oysteinkrog / SQLite.Net-PCL

Simple, powerful, cross-platform SQLite client and ORM - Updated version with PCL support
MIT License
353 stars 162 forks source link

Question about ColumnInfo class (PRAGMA table_info) #316

Closed dg2k closed 2 years ago

dg2k commented 8 years ago

I am switching from SQLitePCL to SQLite.Net-PCL and in the conversion process I was intrigued by some of the differences I couldn't explain. Sorry if this is an old question, hope you don't mind as search didn't help at all.

As an output to the PRAGMA table_info, the ColumnInfo class for SQLite.Net-PCL defines two column properties (Name and notnull) as defined here, while SQLitePCL defines a superset of these (with additional four properties).

Interestingly, SQLite.Net-PCL's code listing (same link) shows all the properties with the missing four commented out as if there was change of heart in including them, and surely there must be a reason for this. Can someone tell me the reason behind this decision?

From the missing ones, the only ColumnInfo property I am interested in (to ease my transition to SQLite.Net-PCL) is one indicating a column as primary key -- this line. What is the alternative to detecting if a column is a primary key or not?