2017-06-07 13:57 GMT-04:00 Simon Slavin <[email protected]>:

> The work of parsing comments in the CREATE TABLE command ?  I don’t think
> anyone else thinks this is worth working on.  Discussion in this list has
> come up with many reasons why it’s a poor way to store comments, including
>
i'm aware of them.. but its a limited support:


> * Difficulty of parsing text which may have CR, LT, tab, comma, etc..
>
use standard way, only LF no comma and TAB allowed.. POSIX always


> * Impossible to update the comments without DROPping and reCREATEing the
> table because SQLite implements only a few ALTER TABLE commands.
>
umm that's enough for limited support!


> * Documentation restricted to one language.
>
i dont understant the meaning of, why multilang comments...?


>
> Here’s a simple version of the best system I ever came up with from
> working in multi-programmer projects, where clear comments were important
> to letting one developer know what another intended.  Comments for a
> database can be stored in the following table in that database:
>
> CREATE TABLE meta_comments (
>         entityType TEXT COLLATE NOCASE NOT NULL,
>         theTable TEXT COLLATE NOCASE NOT NULL,
>         theName TEXT COLLATE NOCASE NOT NULL,
>         theComment TEXT COLLATE NOCASE NOT NULL,
>         PRIMARY KEY (entityType, theTable, theName));
>
> Values for "entityType" can be ’schema’,'table','index','trigger','view',
> and anything else you want to document.
>
that its a good limited aproach! limit the comments to only 12 chars to not
overhead the db size


>
> If you need multilanguage documentation (required for some countries which
> work to protect a language) add a "language TEXT COLLATE NOCASE NOT NULL"
> field and include it in the primary key.  Ih one use of an early version of
> this we also used a field called "theVersion" to document changes in each
> entity, though I don’t know how sensible that is for most uses.  We also
> used to use a table like this to store commands, though if I was designing
> that system from scratch now I’d use a different table.
>

the mayor problem its when sqlite join two files/databases to share the
comments with the other

>
> I came up with the above structure myself, warrant that it is not
> encumbered by any intellectual property, and dedicate it to the public
> domain.  Anyone can use it for anything they want.
>
that its good...enought


>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to