Skip to content

Commit

Permalink
Update 02.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Dec 9, 2024
1 parent 2008fa7 commit ec8edd2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions wwwroot/gfm/lisp/02.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="gfm"><div class="highlight highlight-source-lisp"><pre><span class="pl-c"><span class="pl-c">;</span>&lt;!--</span>
<div class="gfm"><div class="highlight highlight-source-commonlisp"><pre><span class="pl-c"><span class="pl-c">;</span>&lt;!--</span>
<span class="pl-c"><span class="pl-c">;</span> db sqlite</span>
<span class="pl-c"><span class="pl-c">;</span> db.connection northwind.sqlite</span>
<span class="pl-c"><span class="pl-c">;</span> files s3</span>
Expand All @@ -9,20 +9,20 @@
(sh (str (<span class="pl-k">if</span> isWin <span class="pl-s"><span class="pl-pds">"</span>del<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>rm<span class="pl-pds">"</span></span>) <span class="pl-s"><span class="pl-pds">"</span> remove.txt<span class="pl-pds">"</span></span>))

<span class="pl-c"><span class="pl-c">;</span> View all `northwind.sqlite` RDBMS Tables</span>
(textDump (dbTableNames) { :caption <span class="pl-s"><span class="pl-pds">"</span>Northwind<span class="pl-pds">"</span></span> } )
(textDump (dbTableNames) { <span class="pl-en">:caption</span> <span class="pl-s"><span class="pl-pds">"</span>Northwind<span class="pl-pds">"</span></span> } )

<span class="pl-c"><span class="pl-c">;</span> Display first `customer` row in Single Row View showing all Table Columns</span>
(textDump (dbSelect <span class="pl-s"><span class="pl-pds">"</span>select * from customer limit 1<span class="pl-pds">"</span></span>))

<span class="pl-c"><span class="pl-c">;</span> Display all Customers in London</span>
(def city <span class="pl-s"><span class="pl-pds">"</span>London<span class="pl-pds">"</span></span>)
(textDump (dbSelect <span class="pl-s"><span class="pl-pds">"</span>select Id, CompanyName, ContactName from customer where city = @city<span class="pl-pds">"</span></span> { :city city } ))
(textDump (dbSelect <span class="pl-s"><span class="pl-pds">"</span>select Id, CompanyName, ContactName from customer where city = @city<span class="pl-pds">"</span></span> { <span class="pl-en">:city</span> city } ))

<span class="pl-c"><span class="pl-c">;</span> View all root files and folders in configured S3 Virtual File Provider</span>
(joinln (map #(str (.Name %) <span class="pl-s"><span class="pl-pds">"</span>/<span class="pl-pds">"</span></span>) (allRootDirectories vfsContent)))
(joinln (map .Name (allRootFiles vfsContent)))
(joinln (<span class="pl-c1">map</span> <span class="pl-c1">#</span>(str (.Name %) <span class="pl-s"><span class="pl-pds">"</span>/<span class="pl-pds">"</span></span>) (allRootDirectories vfsContent)))
(joinln (<span class="pl-c1">map</span> .Name (allRootFiles vfsContent)))

<span class="pl-c"><span class="pl-c">;</span> Show first 10 *.png files in S3 VFS Provider</span>
(def pattern (<span class="pl-k">or</span> (first ARGV) <span class="pl-s"><span class="pl-pds">"</span>*.png<span class="pl-pds">"</span></span>))
(joinln (map .VirtualPath (take <span class="pl-c1">10</span> (findFiles vfsContent pattern))))</pre></div>
(def pattern (<span class="pl-k">or</span> (<span class="pl-c1">first</span> ARGV) <span class="pl-s"><span class="pl-pds">"</span>*.png<span class="pl-pds">"</span></span>))
(joinln (<span class="pl-c1">map</span> .VirtualPath (take <span class="pl-c1">10</span> (findFiles vfsContent pattern))))</pre></div>
</div>

0 comments on commit ec8edd2

Please sign in to comment.