From efcea3a80da7c4479d5fe168435ecc9fd06bdc72 Mon Sep 17 00:00:00 2001
From: John Turner <jturner.usa@gmail.com>
Date: Sun, 14 Sep 2025 00:16:10 -0400
Subject: Squashed 'subprojects/boost-sqlite/' content from commit 3378e35

git-subtree-dir: subprojects/boost-sqlite
git-subtree-split: 3378e353705271e569cf4ba15c467b840a39798c
---
 example/url.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 example/url.sql

(limited to 'example/url.sql')

diff --git a/example/url.sql b/example/url.sql
new file mode 100644
index 0000000..813917e
--- /dev/null
+++ b/example/url.sql
@@ -0,0 +1,19 @@
+SELECT load_extension('./url');
+
+-- invoke the url function to get any url by it's elements
+select scheme, user, password, host , port, path, query, fragment, "url"
+    from url('ws://echo.example.com/?name=boost&thingy=foo&name=sqlite&#demo');
+
+-- table-ize the segments of url
+select idx, segment from segments('/foo/bar/foo/xyz');
+
+-- tag::query[]
+-- table-ize the query of url
+select * from query('name=boost&thingy=foo&name=sqlite&foo');
+select * from query where query_string = 'name=boost&thingy=foo&name=sqlite&foo';
+-- end::query[]
+
+-- do a left join on the table, so we can use the table function to normalize data.
+select host , query.name, query.value
+from url('ws://echo.example.com/?name=boost&thingy=foo&name=sqlite#demo') left join query on query.query_string = url.query;
+
-- 
cgit v1.2.3

