From d2c9b7e7ca5c143184f0142b1cab02804245847a Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Wed, 29 Nov 2017 14:10:33 +0100 Subject: [PATCH 1/2] Fix code formatting in Query Expressions --- .../language-reference/query-expressions.md | 112 +++++++++--------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/docs/fsharp/language-reference/query-expressions.md b/docs/fsharp/language-reference/query-expressions.md index 847595838be5d..cd567d57a2298 100644 --- a/docs/fsharp/language-reference/query-expressions.md +++ b/docs/fsharp/language-reference/query-expressions.md @@ -89,7 +89,7 @@ let data = [ 1; 5; 7; 11; 18; 21] Description - `contains` + contains Determines whether the selected elements include a specified element.

query {
@@ -104,7 +104,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
 
 
-  `count`Returns the number of selected elements.

+ countReturns the number of selected elements.

query {
     for student in db.Student do
@@ -114,7 +114,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`last`Selects the last element of those selected so far.

+lastSelects the last element of those selected so far.

query {
     for number in data do
@@ -123,7 +123,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`lastOrDefault`Selects the last element of those selected so far, or a default value if no element is found.

+lastOrDefaultSelects the last element of those selected so far, or a default value if no element is found.

query {
     for number in data do
@@ -133,7 +133,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`exactlyOne`Selects the single, specific element selected so far. If multiple elements are present, an exception is thrown.

+exactlyOneSelects the single, specific element selected so far. If multiple elements are present, an exception is thrown.

query {
     for student in db.Student do
@@ -144,7 +144,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`exactlyOneOrDefault`Selects the single, specific element of those selected so far, or a default value if that element is not found.

+exactlyOneOrDefaultSelects the single, specific element of those selected so far, or a default value if that element is not found.

query {
     for student in db.Student do
@@ -155,7 +155,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`headOrDefault`Selects the first element of those selected so far, or a default value if the sequence contains no elements.

+headOrDefaultSelects the first element of those selected so far, or a default value if the sequence contains no elements.

query {
     for student in db.Student do
@@ -165,7 +165,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`select`Projects each of the elements selected so far.

+selectProjects each of the elements selected so far.

query {
     for student in db.Student do
@@ -174,7 +174,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`where`Selects elements based on a specified predicate.

+whereSelects elements based on a specified predicate.

query {
     for student in db.Student do
@@ -184,7 +184,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`minBy`Selects a value for each element selected so far and returns the minimum resulting value.

+minBySelects a value for each element selected so far and returns the minimum resulting value.

query {
     for student in db.Student do
@@ -193,7 +193,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`maxBy`Selects a value for each element selected so far and returns the maximum resulting value.

+maxBySelects a value for each element selected so far and returns the maximum resulting value.

query {
     for student in db.Student do
@@ -202,7 +202,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`groupBy`Groups the elements selected so far according to a specified key selector.

+groupByGroups the elements selected so far according to a specified key selector.

query {
     for student in db.Student do
@@ -212,7 +212,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`sortBy`Sorts the elements selected so far in ascending order by the given sorting key.

+sortBySorts the elements selected so far in ascending order by the given sorting key.

query {
     for student in db.Student do
@@ -222,7 +222,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`sortByDescending`Sorts the elements selected so far in descending order by the given sorting key.

+sortByDescendingSorts the elements selected so far in descending order by the given sorting key.

query {
     for student in db.Student do
@@ -232,7 +232,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`thenBy`Performs a subsequent ordering of the elements selected so far in ascending order by the given sorting key. This operator may only be used after a `sortBy`, `sortByDescending`, `thenBy`, or `thenByDescending`.

+thenByPerforms a subsequent ordering of the elements selected so far in ascending order by the given sorting key. This operator may only be used after a sortBy, sortByDescending, thenBy, or thenByDescending.

query {
     for student in db.Student do
@@ -244,7 +244,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`thenByDescending`Performs a subsequent ordering of the elements selected so far in descending order by the given sorting key. This operator may only be used after a `sortBy`, `sortByDescending`, `thenBy`, or `thenByDescending`.

+thenByDescendingPerforms a subsequent ordering of the elements selected so far in descending order by the given sorting key. This operator may only be used after a sortBy, sortByDescending, thenBy, or thenByDescending.

query {
     for student in db.Student do
@@ -256,7 +256,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`groupValBy`Selects a value for each element selected so far and groups the elements by the given key.

+groupValBySelects a value for each element selected so far and groups the elements by the given key.

query {
     for student in db.Student do
@@ -266,7 +266,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`join`Correlates two sets of selected values based on matching keys. Note that the order of the keys around the = sign in a join expression is significant. In all joins, if the line is split after the `->` symbol, the indentation must be indented at least as far as the keyword `for`.

+joinCorrelates two sets of selected values based on matching keys. Note that the order of the keys around the = sign in a join expression is significant. In all joins, if the line is split after the -> symbol, the indentation must be indented at least as far as the keyword for.

query {
     for student in db.Student do
@@ -277,7 +277,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`groupJoin`Correlates two sets of selected values based on matching keys and groups the results. Note that the order of the keys around the = sign in a join expression is significant.

+groupJoinCorrelates two sets of selected values based on matching keys and groups the results. Note that the order of the keys around the = sign in a join expression is significant.

query {
     for student in db.Student do
@@ -291,7 +291,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`leftOuterJoin`Correlates two sets of selected values based on matching keys and groups the results. If any group is empty, a group with a single default value is used instead. Note that the order of the keys around the = sign in a join expression is significant.

+leftOuterJoinCorrelates two sets of selected values based on matching keys and groups the results. If any group is empty, a group with a single default value is used instead. Note that the order of the keys around the = sign in a join expression is significant.

query {
     for student in db.Student do
@@ -303,7 +303,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`sumByNullable`Selects a nullable value for each element selected so far and returns the sum of these values. If any nullable does not have a value, it is ignored.

+sumByNullableSelects a nullable value for each element selected so far and returns the sum of these values. If any nullable does not have a value, it is ignored.

query {
     for student in db.Student do
@@ -312,7 +312,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`minByNullable`Selects a nullable value for each element selected so far and returns the minimum of these values. If any nullable does not have a value, it is ignored.

+minByNullableSelects a nullable value for each element selected so far and returns the minimum of these values. If any nullable does not have a value, it is ignored.

query {
     for student in db.Student do
@@ -321,7 +321,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`maxByNullable`Selects a nullable value for each element selected so far and returns the maximum of these values. If any nullable does not have a value, it is ignored.

+maxByNullableSelects a nullable value for each element selected so far and returns the maximum of these values. If any nullable does not have a value, it is ignored.

query {
     for student in db.Student do
@@ -330,7 +330,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`averageByNullable`Selects a nullable value for each element selected so far and returns the average of these values. If any nullable does not have a value, it is ignored.

+averageByNullableSelects a nullable value for each element selected so far and returns the average of these values. If any nullable does not have a value, it is ignored.

query {
     for student in db.Student do
@@ -339,7 +339,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`averageBy`Selects a value for each element selected so far and returns the average of these values.

+averageBySelects a value for each element selected so far and returns the average of these values.

query {
     for student in db.Student do
@@ -348,7 +348,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`distinct`Selects distinct elements from the elements selected so far.

+distinctSelects distinct elements from the elements selected so far.

query {
     for student in db.Student do
@@ -359,7 +359,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`exists`Determines whether any element selected so far satisfies a condition.

+existsDetermines whether any element selected so far satisfies a condition.

query {
     for student in db.Student do
@@ -372,7 +372,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`find`Selects the first element selected so far that satisfies a specified condition.

+findSelects the first element selected so far that satisfies a specified condition.

query {
     for student in db.Student do
@@ -381,7 +381,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`all`Determines whether all elements selected so far satisfy a condition.

+allDetermines whether all elements selected so far satisfy a condition.

query {
     for student in db.Student do
@@ -390,7 +390,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`head`Selects the first element from those selected so far.

+headSelects the first element from those selected so far.

query {
     for student in db.Student do
@@ -399,7 +399,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`nth`Selects the element at a specified index amongst those selected so far.

+nthSelects the element at a specified index amongst those selected so far.

query {
     for numbers in data do
@@ -408,7 +408,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`skip`Bypasses a specified number of the elements selected so far and then selects the remaining elements.

+skipBypasses a specified number of the elements selected so far and then selects the remaining elements.

query {
     for student in db.Student do
@@ -417,7 +417,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`skipWhile`Bypasses elements in a sequence as long as a specified condition is true and then selects the remaining elements.

+skipWhileBypasses elements in a sequence as long as a specified condition is true and then selects the remaining elements.

query {
     for number in data do
@@ -427,7 +427,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`sumBy`Selects a value for each element selected so far and returns the sum of these values.

+sumBySelects a value for each element selected so far and returns the sum of these values.

query {
     for student in db.Student do
@@ -436,7 +436,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`take`Selects a specified number of contiguous elements from those selected so far.

+takeSelects a specified number of contiguous elements from those selected so far.

query {
     for student in db.Student do
@@ -446,7 +446,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`takeWhile`Selects elements from a sequence as long as a specified condition is true, and then skips the remaining elements.

+takeWhileSelects elements from a sequence as long as a specified condition is true, and then skips the remaining elements.

query {
     for number in data do
@@ -455,7 +455,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`sortByNullable`Sorts the elements selected so far in ascending order by the given nullable sorting key.

+sortByNullableSorts the elements selected so far in ascending order by the given nullable sorting key.

query {
     for student in db.Student do
@@ -465,7 +465,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`sortByNullableDescending`Sorts the elements selected so far in descending order by the given nullable sorting key.

+sortByNullableDescendingSorts the elements selected so far in descending order by the given nullable sorting key.

query {
     for student in db.Student do
@@ -475,7 +475,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`thenByNullable`Performs a subsequent ordering of the elements selected so far in ascending order by the given nullable sorting key. This operator may only be used immediately after a `sortBy`, `sortByDescending`, `thenBy`, or `thenByDescending`, or their nullable variants.

+thenByNullablePerforms a subsequent ordering of the elements selected so far in ascending order by the given nullable sorting key. This operator may only be used immediately after a sortBy, sortByDescending, thenBy, or thenByDescending, or their nullable variants.

query {
     for student in db.Student do
@@ -486,7 +486,7 @@ let data = [ 1; 5; 7; 11; 18; 21]
 
-`thenByNullableDescending`Performs a subsequent ordering of the elements selected so far in descending order by the given nullable sorting key. This operator may only be used immediately after a `sortBy`, `sortByDescending`, `thenBy`, or `thenByDescending`, or their nullable variants.

+thenByNullableDescendingPerforms a subsequent ordering of the elements selected so far in descending order by the given nullable sorting key. This operator may only be used immediately after a sortBy, sortByDescending, thenBy, or thenByDescending, or their nullable variants.

query {
     for student in db.Student do
@@ -542,7 +542,7 @@ query {
 
-`EXISTS` +EXISTS
SELECT * FROM Student
@@ -676,7 +676,7 @@ query {
 
-`IN` a set of specified values
+IN a set of specified values
SELECT *
 FROM Student
@@ -699,7 +699,7 @@ query {
 
-`LIKE` and `TOP`.
+LIKE and TOP.
-- '_e%' matches strings where the second character is 'e'
 SELECT TOP 2 * FROM Student
@@ -717,7 +717,7 @@ query {
 
-`LIKE` with pattern match set.
+LIKE with pattern match set.
-- '[abc]%' matches strings where the first character is
 -- 'a', 'b', 'c', 'A', 'B', or 'C'
@@ -734,7 +734,7 @@ WHERE Student.Name LIKE '[abc]%'
 
-`LIKE` with set exclusion pattern.
+LIKE with set exclusion pattern.
-- '[^abc]%' matches strings where the first character is
 -- not 'a', 'b', 'c', 'A', 'B', or 'C'
@@ -753,7 +753,7 @@ query {
 
-`LIKE` on one field, but select a different field.
+LIKE on one field, but select a different field.
SELECT StudentID AS ID FROM Student
 WHERE Student.Name LIKE '[^abc]%'
@@ -768,7 +768,7 @@ WHERE Student.Name LIKE '[^abc]%'
 }
 
-`LIKE`, with substring search.
+LIKE, with substring search.
SELECT * FROM Student
 WHERE Student.Name like '%A%'
@@ -785,7 +785,7 @@ query {
 
-Simple `JOIN` with two tables.
+Simple JOIN with two tables.
SELECT * FROM Student
 JOIN CourseSelection
@@ -822,7 +822,7 @@ query {
 }
 
-`JOIN` with `COUNT`
+JOIN with COUNT
SELECT COUNT( * ) FROM Student
 JOIN CourseSelection
@@ -840,7 +840,7 @@ query {
 }
 
-`DISTINCT`
+DISTINCT
SELECT DISTINCT StudentID FROM CourseSelection
 
@@ -873,7 +873,7 @@ query { }
-`BETWEEN`
+BETWEEN
SELECT * FROM Student
 WHERE Student.Age BETWEEN 10 AND 15
@@ -889,7 +889,7 @@ query {
 }
 
-`OR`
+OR
SELECT * FROM Student
 WHERE Student.Age = 11 OR Student.Age = 12
@@ -905,7 +905,7 @@ query {
 }
 
-`OR` with ordering
+OR with ordering
SELECT * FROM Student
 WHERE Student.Age = 12 OR Student.Age = 13
@@ -923,7 +923,7 @@ query {
 }
 
-`TOP`, `OR`, and ordering.
+TOP, OR, and ordering.
SELECT TOP 2 student.Name FROM Student
 WHERE Student.Age = 11 OR Student.Age = 12
@@ -945,7 +945,7 @@ query {
 }
 
-`UNION` of two queries.
+UNION of two queries.
SELECT * FROM Student
 UNION
@@ -994,7 +994,7 @@ let query2 =
 query1.Intersect(query2)
 
-`CASE` condition.
+CASE condition.
SELECT student.StudentID,
 CASE Student.Age

From a390080d8b6a49dfbca5817ba0f7307ed7e40736 Mon Sep 17 00:00:00 2001
From: Petr Onderka 
Date: Wed, 29 Nov 2017 19:44:08 +0100
Subject: [PATCH 2/2] Fixed one more pair of backticks

---
 docs/fsharp/language-reference/query-expressions.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/fsharp/language-reference/query-expressions.md b/docs/fsharp/language-reference/query-expressions.md
index cd567d57a2298..881e975dab2c1 100644
--- a/docs/fsharp/language-reference/query-expressions.md
+++ b/docs/fsharp/language-reference/query-expressions.md
@@ -803,7 +803,7 @@ query {
 }
 
-`LEFT JOIN` with two tables.
+LEFT JOIN with two tables.
SELECT * FROM Student
 LEFT JOIN CourseSelection