SQLITE_ENABLE_UPDATE_DELETE_LIMIT

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SQLITE_ENABLE_UPDATE_DELETE_LIMIT

Olivier Mascia
https://www.sqlite.org/compile.html#enable_update_delete_limit

> SQLITE_ENABLE_UPDATE_DELETE_LIMIT
>
> This option enables an optional ORDER BY and LIMIT clause on UPDATE and DELETE statements.
>
> If this option is defined, then it must also be defined when using the Lemon parser generator tool to generate a parse.c file.


What minimal changes do I need to do to a single / multiple configuration file(s) of the source tree to be able to produce the sqlite3.c amalgamation with this feature turned on and everything else carefully configured as the default amalgamation file?  So that I get an amalgamation file functionally equivalent to the one distributed, except for this feature properly pre-enabled (presumably through compiling that amalgamation with SQLITE_ENABLE_UPDATE_DELETE_LIMIT too).

Is this even possible, or is a complete standalone build required?

It would help if I could just rebuild a correctly configured new amalgamation upon releases, and then keep my integration process clean, re-using the built amalgamation source file in my programs. It better fits my production process (using MSVC 2017).

I can manage to run the build tools properly, for the target sqlite3.c or sqlite_analyzer.exe for instance. I'm just not confident yet as to where to start to patch the configuration so that I can lean to such an updated sqlite3.c file (without breaking anything).

By the way...
This was clearly designed to keep this feature out of access except on very specific needs.  Is it because the syntax behind is far from being standard or common on other engines?  Or because it implies a significant increase in code size or execution time, so is not eligible for the default amalgamation?

--
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLITE_ENABLE_UPDATE_DELETE_LIMIT

Olivier Mascia
> Le 16 oct. 2018 à 16:39, Olivier Mascia <[hidden email]> a écrit :
>
> https://www.sqlite.org/compile.html#enable_update_delete_limit
...
> I can manage to run the build tools properly, for the target sqlite3.c or sqlite_analyzer.exe for instance. I'm just not confident yet as to where to start to patch the configuration so that I can lean to such an updated sqlite3.c file (without breaking anything).

For now, I think I should be safe (it looks like it works), starting from the snapshop of the complete (raw) source tree (zip file), by just adding those lines (marked below with ---) right after all the other conditionals to add other features (in Makefile.msc).

Then doing 'nmake -f Makefile.msc sqlite3.c'

> !IF $(SESSION)!=0
> OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
> OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
> !ENDIF
>
> --- # Enable the optional UPDATE_DELETE_LIMIT feature
> --- OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
>
> # These are the "extended" SQLite compilation options used when compiling for
> # the Windows 10 platform.
> #

The build (of sqlite3.c) with that modification runs OK (I have dependency tools pre-installed). In addition, I compile my own projects with that amalgamation .c and .h files (defining SQLITE_ENABLE_UPDATE_DELETE too) just fine and what's more the feature works properly for my use case. :)

So I'm just looking for guidance / confirmation that I'm not missing anything in this process.

--
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


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