oh. my understanding of the sqlite docs is that rowid is just an internal
thing that we shouldn't rely on because they reserve the right to change
what it does between versions etc?
i'm totally for an additional id in this case.. there is some sql update
path somewhere around control_init() (control.c:690) maybe it's possible to
add an additional column id = rowid in case there is no id col yet.
-jo
On Sun, Oct 20, 2013 at 8:23 PM, Pascal Obry <pas...@obry.net> wrote:
>
> The problem is the following.
>
> The styles are numbered after its rowid (table styles)
>
> The styles items have a styleid referencing the style above.
>
> When a style is removed the rowid are non continuous, that is:
>
> sqlite> select rowid,* from styles;
> 1|red|
> 3|blue|
> 4|violet|
>
> The rowid is style referencing the proper items.
>
> But if the database is vacuumed, the those rowid are continuous and not
> referencing the proper style:
>
> sqlite> vacuum;
> sqlite> select rowid,* from styles;
> 1|red|
> 2|blue|
> 3|violet|
>
> I think it is a mistake to use the rowid as an index. In fact it is the
> only cases on dt where this is done.
>
> The proper solution would be to introduce an id into the styles table.
>
> Not sure how to handle this migration path though.
>
> Idea?
>
> --
> Pascal Obry / Magny Les Hameaux (78)
>
> The best way to travel is by means of imagination
>
> http://v2p.fr.eu.org
> http://www.obry.net
>
> gpg --keyserver keys.gnupg.net --recv-key F949BD3B
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> _______________________________________________
> darktable-devel mailing list
> darktable-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/darktable-devel
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel