I just want to note here that I'm uncomfortable with the docs on type
affinity in a general sort of way.  I've read that section several
times in the hope of feeling more comfortable, but so far I still
don't.  Unfortunately I can't say how I would improve them exactly, I
just know they leave me with an unhappy feeling of not knowing exactly
what's going on.  Perhaps someone with more knowledge could improve
them somehow.

Britton

On 11/23/17, Peter Halasz <pe...@becauseofgames.com> wrote:
> Thank you. It looks like I was looking at the wrong documentation page.
>
> So I will reiterate and clarify my advice that the datatype documentation (
> https://sqlite.org/datatype3.html), within the section on "Determination Of
> Column Affinity", should more clearly state the fact that the affinity
> rules do not apply for the special "INTEGER PRIMARY KEY" type.
>
> Perhaps "INTEGER PRIMARY KEY" could be a special rule #0, as otherwise the
> impression is that BigInt and Integer should act the same in all
> circumstances, which I have learned now is clearly not the case.
>
> I do notice now there is a cryptic link to "INTEGER PRIMARY KEY
> <https://sqlite.org/lang_createtable.html#rowid>" in the section 2, before
> type affinity is introduced, but it gives no reason for the reader to think
> it links to special rules about how type affinity may or may not work. i.e.
> it says "Any column in an SQLite version 3 database, except an INTEGER
> PRIMARY KEY column, may be used to store a value of any storage class."
>
> So I hope this documentation page can be made clearer for future devs.
>
> As for whether I need to use AUTOINCREMENT, it seemed like a good idea to
> avoid rowid reuse, but I can avoid using it for the sake of optimization,
> so probably will.
>
> Thanks again.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to