File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
examples/official-site/sqlpage/migrations
src/webserver/database/sqlpage_functions Expand file tree Collapse file tree 3 files changed +5
-2
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -634,7 +634,7 @@ async fn set_variable<'a>(
634634 }
635635
636636 let json_val = serde_json:: Value :: Object ( params_map) ;
637- let encoded: URLParameters = serde_json:: from_value ( json_val) ?;
637+ let encoded: URLParameters = serde_json:: from_str ( & json_val. to_string ( ) ) ?;
638638
639639 let mut url = context. path . clone ( ) ;
640640 let encoded_str = encoded. get ( ) ;
Original file line number Diff line number Diff line change 11set url = sqlpage .set_variable (' y' , ' 2' );
22set path = sqlpage .path ();
3+ set x = json_extract(sqlpage .variables (' get' ), ' $.x' );
4+
35select ' text' as component,
46 case
5- when $url = $path || ' ?x=1&y=2' OR $url = $path || ' ?y=2&x=1' THEN ' It works !'
7+ when $x is not null AND ($url = $path || ' ?x=' || $x || ' &y=2' OR $url = $path || ' ?y=2&x=' || $x) THEN ' It works !'
8+ when $x is null AND $url = $path || ' ?y=2' THEN ' It works !'
69 else ' error: ' || $url
710 end as contents;
You can’t perform that action at this time.
0 commit comments