发布

  • - Many improvements in the [`form`](https://sql.ophir.dev/documentation.sql?component=form#component) component

    frostbyte_neo 发布于 2023-11-07 22:57:51 +00:00 | 2226 次提交 在此版本后已推送到 main

    • Multiple form fields can now be aligned on the same line using the width attribute.
    • A reset button can now be added to the form using the reset top-level attribute.
    • The submit button can now be customized, and can be removed completely, which is useful to create multiple submit buttons that submit the form to different targets.
    • Support non-string values in markdown fields. NULL values are now displayed as empty strings, numeric values are displayed as strings, booleans as true or false, and arrays as lines of text. This avoids the need to cast values to strings in SQL queries.
    • Revert a change introduced in v0.15.0:
      • Re-add the systematic CAST(? AS TEXT) around variables, which helps the database know which type it is dealing with in advance. This fixes a regression in 0.15 where some SQLite websites were broken because of missing affinity information. In SQLite SELECT '1' = 1 returns false but SELECT CAST('1' AS TEXT) = 1 returns true. This also fixes error messages like could not determine data type of parameter $1 in PostgreSQL.
    • Fix a bug where cookie removal set the cookie value to the empty string instead of removing the cookie completely.
    • Support form submission using the button component using its new form property. This allows you to create a form with multiple submit buttons that submit the form to different targets.
    • Custom icons and colors for markers in the map component.
    • Add support for GeoJSON in the map component. This makes it much more generic and allows you to display any kind of geographic data, including areas, on a map very easily. This plays nicely with PostGIS and Spatialite which can return GeoJSON directly from SQL queries.
    下载附件