Loading a sqlite extension #557
Replies: 4 comments 3 replies
-
Hello and welcome to SQLPage ! {
"database_url": "sqlite://./sqlpage/sqlpage.db?mode=rwc",
"max_uploaded_file_size": 200000,
"port": "8080",
"allow_exec":true,
"sqlite_extensions": ["mod_spatialite", "crypto", "define", "regex", "eval"]
} Notice that the sqlite_extension object is an array, not a string.
If you have specified the extensions list correctly but the extension cannot be found on your system, you will see the following warning messages repeated on the console until you add the extension:
If you placed the extension file in a non-standard library path for your system, you will need to specify the path to the extension file. For instance, you can decide to place it inside the {
"database_url": "sqlite://./sqlpage/sqlpage.db?mode=rwc",
"sqlite_extensions": ["./sqlpage/eval.so"]
} |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your responsiveness, I get the same error message on the web page and no message in the terminal ? {
"database_url": "sqlite://./sqlpage/sqlpage.db?mode=rwc",
"max_uploaded_file_size": 200000,
"port": "8080",
"allow_exec":true,
"sqlite_extensions": ["./sqlpage/extensions/eval/eval.so"]
} Error We are sorry, but an error occurred while generating this page. You should contact the site's administrator. error returned from database: (code: 1) no such function: eval (at statement byte offset 793) Error in query: WITH columns AS (SELECT DISTINCT pro.reference AS reference, pro.name FROM product AS pro LEFT JOIN order_line AS lc ON pro.reference = lc.reference WHERE lc.quantite > 0 AND lc.numero = 7), lines AS (SELECT 'drop view if exists v_synthese_distrib_ command_num_; ' AS part UNION ALL SELECT 'create view v_synthese_distrib_command_num_ as ' UNION ALL SELECT 'select adh.name ' UNION ALL SELECT ', sum(quantity) filter (where lc.reference = ' || reference || ') as "' || name || '" ' FROM columns UNION ALL SELECT ', sum(quantity) AS Total ' UNION ALL S ELECT 'FROM lc_command line LEFT JOIN adherent adh ON lc.id_adherent = adh.id_adherent LEFT JOIN product p ON lc.reference = p.reference WHERE lc.quantity > 0 AND lc.numero = 7 group by lc.id_adherent order by lc.id_adherent;') SELECT eval(group_concat(part, '')) FROM lines; Backtrace (code: 1) no such function: eval (at statement byte offset 793) |
Beta Was this translation helpful? Give feedback.
-
if I add this piece of code at the start of my sql query:
I have this error message: `Error We are sorry, but an error occurred while generating this page. You should contact the site's administrator. error returned from database: (code: 1) not authorized Backtrace (code: 1) not authorized` Thanks |
Beta Was this translation helpful? Give feedback.
-
Sorry 🙏, You right, the "sqlpage.json" is not locate in the good directory... |
Beta Was this translation helpful? Give feedback.
-
Good morning,
Many thanks for this wonderful framework and all its possibilities...🎉🎊🎉🎊🎉
It's beautiful and easy to create a powerfull app !
Member of a small consumer association, I am in the process of setting up a platform for managing orders, products, etc. (I will share the code when it is more advanced)
I'm running into a problem, I need to create a (dynamic) summary table where I'm transposing rows into columns.
I use "dbeaver" for management/debugging of my database and when I run the code below, everything works!
I use sqlite database.
sqlpage v0.26
and when I play it with SQLPAGE, it does not recognize the "eval" function?
However I tried to put the "define" extension in the sqlpage.json
Do you have an idea?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions