{"size": 800, "ext": "scrbl", "max_stars_repo_path": "plisqin-doc/scribblings/aw-reference.scrbl", "max_stars_repo_name": "default-kramer/plisqin", "max_stars_repo_stars_event_min_datetime": "2018-11-26T21:09:05.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-22T22:18:39.000Z", "max_issues_repo_path": "plisqin-doc/scribblings/aw-reference.scrbl", "max_issues_repo_name": "default-kramer/plisqin", "max_issues_repo_issues_event_min_datetime": "2019-06-20T16:05:30.000Z", "max_issues_repo_issues_event_max_datetime": "2020-07-26T01:14:22.000Z", "max_forks_repo_path": "plisqin-doc/scribblings/aw-reference.scrbl", "max_forks_repo_name": "default-kramer/plisqin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 9, "max_issues_count": 12, "max_forks_count": null, "avg_line_length": 29.6296296296, "max_line_length": 75, "alphanum_fraction": 0.68875}
#lang scribble/manual

@(begin
   (require (for-label plisqin-examples/adventure-works
                       "standard-label.rkt"))
   (require "helpers.rkt")
   )

@title{plisqin-examples/adventure-works}
@(defmodule plisqin-examples/adventure-works)

@defproc[(show-table [x (or/c query? string?)]) any/c]{
 Executes a query (or raw SQL) against the Adventure Works sample database.
 @(repl-query
   (aw:show-table "select ProductCategoryID, Name from ProductCategory"))
}

@defproc[(connect-adventure-works) db:connection?]{
 Creates a connection to the Adventure Works sample database.
 @(repl
   (let* ([conn (aw:connect-adventure-works)]
          [stmt "select ProductCategoryID, Name from ProductCategory"]
          [rows (db:query-rows conn stmt)])
     (db:disconnect conn)
     rows))
}
