Skip to content

Commit dd2d851

Browse files
committed
fix: Convert Asciidoc source blocks to gensql blocks for runnable examples in browser
1 parent a66976b commit dd2d851

30 files changed

+42
-42
lines changed

docs/modules/ROOT/partials/base/commands.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The `+.import+` command creates a table from a `+.csv+` file.
1313
.Import a table from a `+.csv+` file
1414
[example]
1515
====
16-
[source,gensql]
16+
[gensql]
1717
----
1818
.import /path/to/satellites.csv satellites
1919
----
@@ -26,7 +26,7 @@ The `+.export+` command writes a table to disk as a `+.csv+` file.
2626
.Export a table to a `+.csv+` file
2727
[example]
2828
====
29-
[source,gensql]
29+
[gensql]
3030
----
3131
.export /path/to/satellites.csv satellites
3232
----

docs/modules/ROOT/partials/base/scalar-expressions.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Basic arithmetic like multiplication, subtraction, addition, and division can be
4444

4545
[example]
4646
====
47-
[source,gensql]
47+
[gensql]
4848
----
4949
SELECT PROBABILITY OF VAR Apogee_km > Apogee_km UNDER military_model
5050
----
@@ -54,7 +54,7 @@ SELECT PROBABILITY OF VAR Apogee_km > Apogee_km UNDER military_model
5454

5555
[example]
5656
====
57-
[source,gensql]
57+
[gensql]
5858
----
5959
SELECT PROBABILITY DENSITY OF VAR Apogee_km < 1000
6060
UNDER model CONDITIONED BY VAR Users = "Military"

docs/modules/ROOT/partials/base/statements/alter.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `+ALTER+` command adds new columns to a table in the database.
55
.Add a column to the `+satellites+` table
66
[example]
77
====
8-
[source,gensql]
8+
[gensql]
99
----
1010
ALTER satellites ADD Swath!
1111
----

docs/modules/ROOT/partials/base/statements/create-table.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `+CREATE TABLE+` statement assigns a name to a table so it can be referenced
55
.Assign a name to a <<VALUES,table literal>>
66
[example]
77
====
8-
[source,gensql]
8+
[gensql]
99
----
1010
CREATE TABLE launch_sites AS
1111
(Launch_Site, State) VALUES

docs/modules/ROOT/partials/base/statements/drop-model.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+DROP MODEL+` statement removes a model from the database.
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
DROP MODEL model!
1010
----

docs/modules/ROOT/partials/base/statements/drop-table.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+DROP TABLE+` statement removes a table from the database.
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
DROP TABLE satellites!
1010
----

docs/modules/ROOT/partials/base/statements/insert-into.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `+INSERT INTO+` statement inserts a table into a table.
55
.Insert two rows into the `+satellites+` table
66
[example]
77
====
8-
[source,gensql]
8+
[gensql]
99
----
1010
INSERT INTO satellites
1111
(Users, Apogee_km, Perigee_km) VALUES

docs/modules/ROOT/partials/base/statements/update.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `+UPDATE+` statement modifies the contents of a table in the database.
55
.Rename a launch site
66
[example]
77
====
8-
[source,gensql]
8+
[gensql]
99
----
1010
UPDATE satellites
1111
SET Launch_Site = "Majestic Cape Canaveral"

docs/modules/ROOT/partials/base/table-expressions/alter.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `+ALTER+` expression evaluates to the a copy of a table with a new empty col
55
.Retrieve the `+satellites+` table with a new column added
66
[example]
77
====
8-
[source,gensql]
8+
[gensql]
99
----
1010
ALTER satellites ADD Swath
1111
----

docs/modules/ROOT/partials/base/table-expressions/insert.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `+INSERT+` expression evaluates to a new table with additional values.
55
.Retrieve the `+satellites+` table with two rows inserted
66
[example]
77
====
8-
[source,gensql]
8+
[gensql]
99
----
1010
INSERT INTO satellites
1111
(Users, Apogee_km, Perigee_km) VALUES

docs/modules/ROOT/partials/base/table-expressions/joins.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Join expressions combine columns from two tables into a new table.
66

77
[example]
88
====
9-
[source,gensql]
9+
[gensql]
1010
----
1111
satellites CROSS JOIN launch_sites
1212
----
@@ -16,7 +16,7 @@ satellites CROSS JOIN launch_sites
1616

1717
[example]
1818
====
19-
[source,gensql]
19+
[gensql]
2020
----
2121
satellites INNER JOIN launch_sites
2222
ON satellites.Launch_Site = launch_sites.Launch_Site

docs/modules/ROOT/partials/base/table-expressions/literal.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tables can be expressed literally using the `+VALUES+` keyword.
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
(Users, Apogee_km, Perigee_km) VALUES
1010
("Military", 36012, 35559),

docs/modules/ROOT/partials/base/table-expressions/renaming.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Table expressions can be renamed with the `+AS+` keyword.
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
(Launch_Site, State) VALUES
1010
("Cape Canaveral", "Florida"),

docs/modules/ROOT/partials/base/table-expressions/select.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The `+SELECT+` expression evaluates a <<Scalar expressions,scalar expression>> i
66
.Retrieving an entire table
77
[example]
88
====
9-
[source,gensql]
9+
[gensql]
1010
----
1111
SELECT * FROM satellites
1212
----
@@ -15,7 +15,7 @@ SELECT * FROM satellites
1515
.Retrieve a subset of a table's columns
1616
[example]
1717
====
18-
[source,gensql]
18+
[gensql]
1919
----
2020
SELECT Users, Apogee_km, Perigee_km FROM satellites
2121
----
@@ -24,7 +24,7 @@ SELECT Users, Apogee_km, Perigee_km FROM satellites
2424
.Exclude a subset of a table's columns
2525
[example]
2626
====
27-
[source,gensql]
27+
[gensql]
2828
----
2929
SELECT * EXCEPT Contractor, Country_of_Operator FROM satellites
3030
----

docs/modules/ROOT/partials/base/table-expressions/update.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `+UPDATE+` expression evaluates to the a copy of a table with a set of chang
55
.Retrieve the `+satellites+` table with a launch site renamed
66
[example]
77
====
8-
[source,gensql]
8+
[gensql]
99
----
1010
UPDATE satellites
1111
SET Launch_Site = "Majestic Cape Canaveral"

docs/modules/ROOT/partials/permissive/model-expressions/given.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.Compute the probability of the satellite's period from the model, given the class of orbit.
44
[example]
55
====
6-
[source,gensql]
6+
[gensql]
77
----
88
SELECT
99
PROBABILITY OF Period_minutes
@@ -16,7 +16,7 @@ FROM satellites
1616
.Compute the probability of the satellite's period from the model, given everything but the period, contractor, and operator's country.
1717
[example]
1818
====
19-
[source,gensql]
19+
[gensql]
2020
----
2121
SELECT
2222
PROBABILITY OF Period_minutes

docs/modules/ROOT/partials/permissive/scalar-expressions/mutual-information-of.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[example]
44
====
5-
[source,gensql]
5+
[gensql]
66
----
77
SELECT
88
MUTUAL INFORMATION OF Apogee_km < 1000
@@ -14,7 +14,7 @@ FROM satellites
1414

1515
[example]
1616
====
17-
[source,gensql]
17+
[gensql]
1818
----
1919
SELECT
2020
MUTUAL INFORMATION OF Apogee_km

docs/modules/ROOT/partials/permissive/scalar-expressions/probability-of.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[example]
44
====
5-
[source,gensql]
5+
[gensql]
66
----
77
SELECT PROBABILITY OF Period_minutes UNDER satellites_model
88
----

docs/modules/ROOT/partials/permissive/statements/create-model.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+CREATE MODEL+` statement assigns a name to a model so it can be referenced
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
CREATE MODEL military_model AS satellites_model GIVEN Users = "Military"!
1010
----

docs/modules/ROOT/partials/permissive/table-expressions/generate.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ WARNING: The tables returned by `+GENERATE+` are infinite. A query comprised of
77
.Generate 10 rows of 3 columns from the model
88
[example]
99
====
10-
[source,gensql]
10+
[gensql]
1111
----
1212
SELECT *
1313
FROM
@@ -23,7 +23,7 @@ LIMIT 10
2323
.Generate 10 rows containing almost all columns from the model, but excluding 2
2424
[example]
2525
====
26-
[source,gensql]
26+
[gensql]
2727
----
2828
SELECT *
2929
FROM

docs/modules/ROOT/partials/permissive/table-expressions/generative-join.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+GENERATIVE JOIN+` expression evaluates to a table by combining a model and
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
satellites GENERATIVE JOIN satellites_model GIVEN Users AND Apogee_km AND Perigee_km
1010
----

docs/modules/ROOT/partials/permissive/table-expressions/with.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+WITH+` keyword allows you to bind names to values for the lifetime of a qu
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
WITH (satellites_model GIVEN Users = "Military") AS military_model:
1010
SELECT PROBABILITY OF Apogee_km UNDER military_model

docs/modules/ROOT/partials/strict/model-expressions/conditioned-by.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.Compute the probability density of a model variable after conditioning on another variable
44
[example]
55
====
6-
[source,gensql]
6+
[gensql]
77
----
88
SELECT
99
PROBABILITY DENSITY OF VAR Apogee_km < 1000
@@ -16,7 +16,7 @@ FROM satellites_model
1616
.Compute the probability density of a model variable after conditioning on all other variables except one
1717
[example]
1818
====
19-
[source,gensql]
19+
[gensql]
2020
----
2121
SELECT
2222
PROBABILITY DENSITY OF VAR Apogee_km < 1000

docs/modules/ROOT/partials/strict/model-expressions/constrained-by.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[example]
44
====
5-
[source,gensql]
5+
[gensql]
66
----
77
SELECT
88
PROBABILITY OF VAR Users = "Military"

docs/modules/ROOT/partials/strict/scalar-expressions/mutual-information-of.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[example]
44
====
5-
[source,gensql]
5+
[gensql]
66
----
77
SELECT
88
MUTUAL INFORMATION OF VAR Apogee_km < 1000
@@ -16,7 +16,7 @@ FROM satellites
1616

1717
[example]
1818
====
19-
[source,gensql]
19+
[gensql]
2020
----
2121
SELECT
2222
APPROXIMATE MUTUAL INFORMATION OF VAR Apogee_km

docs/modules/ROOT/partials/strict/scalar-expressions/probability-of.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[example]
44
====
5-
[source,gensql]
5+
[gensql]
66
----
77
SELECT PROBABILITY OF VAR Apogee_km > Apogee_km UNDER military_model
88
----
@@ -12,7 +12,7 @@ SELECT PROBABILITY OF VAR Apogee_km > Apogee_km UNDER military_model
1212

1313
[example]
1414
====
15-
[source,gensql]
15+
[gensql]
1616
----
1717
SELECT PROBABILITY DENSITY OF VAR Apogee_km < 1000
1818
UNDER model CONDITIONED BY VAR Users = "Military"

docs/modules/ROOT/partials/strict/statements/create-model.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+CREATE MODEL+` statement assigns a name to a model so it can be referenced
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
CREATE MODEL military_model AS model CONDITIONED BY VAR Users = "Military"!
1010
----

docs/modules/ROOT/partials/strict/table-expressions/generate.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ WARNING: The tables returned by `+GENERATE+` are infinite. A query comprised of
77
.Generate 10 rows of three columns from the model
88
[example]
99
====
10-
[source,gensql]
10+
[gensql]
1111
----
1212
SELECT *
1313
FROM
@@ -23,7 +23,7 @@ LIMIT 10
2323
.Generate 10 rows containing almost all columns from the model, but excluding 2
2424
[example]
2525
====
26-
[source,gensql]
26+
[gensql]
2727
----
2828
SELECT *
2929
FROM

docs/modules/ROOT/partials/strict/table-expressions/generative-join.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+GENERATIVE JOIN+` expression evaluates to a table by combining a model and
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
satellites GENERATIVE JOIN satellites_model CONDITIONED BY VAR Users = Users AND VAR Apogee_km = Apogee_km AND VAR Perigee_km = Perigee_km
1010
----

docs/modules/ROOT/partials/strict/table-expressions/with.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `+WITH+` keyword allows you to bind names to values for the lifetime of a qu
44

55
[example]
66
====
7-
[source,gensql]
7+
[gensql]
88
----
99
WITH (satellites_model CONDITIONED BY VAR Users = "Military") AS military_model:
1010
SELECT PROBABILITY OF VAR Apogee_km > Apogee_km UNDER military_model

0 commit comments

Comments
 (0)