551 Commits

Author SHA1 Message Date
lovasoa 82935123b4 fix inconsistency in csv component: "separator", not "delimiter" https://github.com/sqlpage/SQLPage/pull/608#issuecomment-2439444243 2024-10-26 17:30:30 +03:00
lovasoa 99f0a00343 automatically add extension to filename in csv component when needed 2024-10-26 17:21:27 +03:00
lovasoa 06e8e716c0 fix duplicated and misleading error message when the user closes the connection early 2024-10-26 17:07:57 +03:00
lovasoa c8531cf54d reformat csv code 2024-10-26 16:59:27 +03:00
lovasoa 530861b5aa remove needless vector allocation 2024-10-26 16:53:30 +03:00
lovasoa 907c946fd5 csv streaming fixes and performance improvements 2024-10-26 01:38:35 +03:00
lovasoa 1e785dde04 csv docs 2024-10-26 00:31:24 +03:00
lovasoa 60ada622c1 move responsewriter to its own module 2024-10-25 23:53:36 +03:00
lovasoa 794da102f3 reset default_max_pending_rows = 256 2024-10-25 23:28:48 +03:00
lovasoa 92c582ebdd reimplement async_flush and asyncwrite 2024-10-25 23:22:43 +03:00
lovasoa e00dd8b14d clippy 2024-10-25 15:25:04 +03:00
lovasoa 4e1800cf92 remove interior mutability in response writer 2024-10-25 15:19:13 +03:00
lovasoa 0c53740220 implement top-level csv component 2024-10-25 14:57:59 +03:00
lovasoa 38d6e5f058 fix a bug where the last event was not sent correctly with json sse 2024-10-23 15:19:33 +02:00
lovasoa f8241a9e78 json: support streaming query results as json array, jsonlines, or server-sent events 2024-10-22 23:45:53 +02:00
lovasoa 1328f4b61a add an indirection around RenderContext
This should make it easier to render other things than html in the future
2024-10-22 16:47:24 +02:00
lovasoa 67e51f8a8b new database_password configuration option 2024-10-05 23:07:40 +02:00
lovasoa dd919d3c90 fmt 2024-10-05 22:46:41 +02:00
lovasoa 9e580753e4 Easier json handling in databases without a native json type. SQLPage now detects when you use a json function in SQLite or MariaDB to generate a column, and automatically converts the resulting string to a json object. This allows easily using components that take json parameters (like the new columns component) in MariaDB and SQLite.
fixes #633
2024-10-05 22:31:29 +02:00
lovasoa e0733522bd fmt 2024-09-24 23:02:47 +02:00
lovasoa 38dbde4ca0 fix https://github.com/lovasoa/SQLpage/discussions/600 2024-09-24 22:39:57 +02:00
lovasoa 0a9390fd64 better error messages on invalid configuration 2024-09-19 21:51:00 +02:00
lovasoa 589825bb45 fix windows tests 2024-09-19 21:17:05 +02:00
lovasoa 63045dd147 make component_index available insite #each_row 2024-09-19 00:23:33 +02:00
lovasoa 3c925dc7a9 fix Configuration directory environment variable loading
fixes https://github.com/lovasoa/SQLpage/issues/598

also adds extensive tests to prevent this from happening again
2024-09-17 18:01:46 +02:00
lovasoa be043dd6c9 clippy 2024-09-14 15:01:11 +02:00
lovasoa f2c1be4bdd create the default database file in the config dir 2024-09-14 11:54:41 +02:00
lovasoa 38500f2839 fmt + clippy 2024-09-14 11:22:49 +02:00
lyderic f6aeb57b62 Another attempt at voiding the database_url before validation 2024-09-14 09:57:09 +02:00
lyderic 386dc30a4b Attempt to initialize database_url with empty default 2024-09-14 09:11:03 +02:00
lovasoa c94b35af7c remove support for set $variable (use set variable instead). 2024-09-13 11:40:47 +02:00
lovasoa 25de18fbad check the existance of the web and config dir on startup
fixes https://github.com/lovasoa/SQLpage/pull/565#issuecomment-2333324976
2024-09-06 08:52:59 +02:00
lovasoa e32c2d0ead add a config-file cli argument 2024-09-05 23:10:13 +02:00
lovasoa 2e7e2ec390 improve cli parsing 2024-09-05 23:10:13 +02:00
lovasoa ec147330c7 format 2024-09-05 23:10:13 +02:00
lyderic 417cb8cc3a little typo 2024-09-05 23:10:13 +02:00
lyderic 051767e4a7 Getting values from CLI, how to use them now? 2024-09-05 23:10:13 +02:00
lyderic af86b3f757 Added command line arguments 2024-09-05 23:10:13 +02:00
lovasoa b64a6d29f9 clean database connection closing on shutdown 2024-08-28 20:40:31 +02:00
lovasoa 0b93108d7f clippy fixes 2024-08-22 23:50:32 +02:00
lovasoa 3c405fcec0 document 404.sql
thanks again to  @wucke13  who implemented the feature
2024-08-22 23:49:54 +02:00
wucke13 3ac80fb543 feat: add 404.sql handler 2024-08-22 20:48:03 +02:00
lovasoa f751834413 better http client logging 2024-08-16 23:32:03 +02:00
lovasoa 050bc65ab8 improved sqlpage.fetch logging 2024-08-16 23:16:47 +02:00
lovasoa 515931ef75 improve sqlpage.fetch error handling 2024-08-16 23:10:29 +02:00
lovasoa b3c8d69fb9 improved error handling: stop after first error 2024-08-14 18:24:05 +02:00
lovasoa 97562e662d remove debugging statement 2024-08-14 17:27:44 +02:00
lovasoa dd29347779 Stop parsing SQL files at the first syntax error
..., and display a single error message about the error.
The previous behavior was to try paresing a new statement after a syntax error, leading to an avalanche of irrelevant error messages after a syntax error.
2024-08-14 17:16:44 +02:00
lovasoa 9e49741d4c Fix MySQL BigInt handling
fixes https://github.com/lovasoa/SQLpage/issues/532
see https://github.com/lovasoa/SQLpage/discussions/531
2024-08-13 16:54:36 +02:00
lovasoa 5abc7762aa add a test for https://github.com/lovasoa/SQLpage/issues/526 2024-08-12 22:40:29 +02:00