Skip to content

Commit 168e39f

Browse files
committed
[DOCS] Remove unneeded options from [source,sql] code blocks (#42759)
In AsciiDoc, `subs="attributes,callouts,macros"` options were required to render `include-tagged::` in a code block. With elastic/docs#827, Elasticsearch Reference documentation migrated from AsciiDoc to Asciidoctor. In Asciidoctor, the `subs="attributes,callouts,macros"` options are no longer needed to render `include-tagged::` in a code block. This commit removes those unneeded options. Resolves #41589
1 parent 6c7bcbc commit 168e39f

17 files changed

+156
-157
lines changed

docs/reference/sql/functions/conditional.asciidoc

+14-14
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ If all arguments are null, then it returns `null`.
3838

3939

4040

41-
["source","sql",subs="attributes,callouts,macros"]
41+
[source, sql]
4242
----
4343
include-tagged::{sql-specs}/docs.csv-spec[coalesceReturnNonNull]
4444
----
4545

46-
["source","sql",subs="attributes,callouts,macros"]
46+
[source, sql]
4747
----
4848
include-tagged::{sql-specs}/docs.csv-spec[coalesceReturnNull]
4949
----
@@ -82,12 +82,12 @@ If all arguments are null, then it returns `null`.
8282

8383

8484

85-
["source","sql",subs="attributes,callouts,macros"]
85+
[source, sql]
8686
----
8787
include-tagged::{sql-specs}/docs.csv-spec[greatestReturnNonNull]
8888
----
8989

90-
["source","sql",subs="attributes,callouts,macros"]
90+
[source, sql]
9191
----
9292
include-tagged::{sql-specs}/docs.csv-spec[greatestReturnNull]
9393
----
@@ -120,12 +120,12 @@ If all arguments are null, then it returns `null`.
120120

121121

122122

123-
["source","sql",subs="attributes,callouts,macros"]
123+
[source, sql]
124124
----
125125
include-tagged::{sql-specs}/docs.csv-spec[ifNullReturnFirst]
126126
----
127127

128-
["source","sql",subs="attributes,callouts,macros"]
128+
[source, sql]
129129
----
130130
include-tagged::{sql-specs}/docs.csv-spec[ifNullReturnSecond]
131131
----
@@ -159,12 +159,12 @@ If all arguments are null, then it returns `null`.
159159

160160

161161

162-
["source","sql",subs="attributes,callouts,macros"]
162+
[source, sql]
163163
----
164164
include-tagged::{sql-specs}/docs.csv-spec[isNullReturnFirst]
165165
----
166166

167-
["source","sql",subs="attributes,callouts,macros"]
167+
[source, sql]
168168
----
169169
include-tagged::{sql-specs}/docs.csv-spec[isNullReturnSecond]
170170
----
@@ -204,12 +204,12 @@ If all arguments are null, then it returns `null`.
204204

205205

206206

207-
["source","sql",subs="attributes,callouts,macros"]
207+
[source, sql]
208208
----
209209
include-tagged::{sql-specs}/docs.csv-spec[leastReturnNonNull]
210210
----
211211

212-
["source","sql",subs="attributes,callouts,macros"]
212+
[source, sql]
213213
----
214214
include-tagged::{sql-specs}/docs.csv-spec[leastReturnNull]
215215
----
@@ -241,12 +241,12 @@ Returns `null` when the two input expressions are equal and
241241
if not, it returns the 1st expression.
242242

243243

244-
["source","sql",subs="attributes,callouts,macros"]
244+
[source, sql]
245245
----
246246
include-tagged::{sql-specs}/docs.csv-spec[nullIfReturnFirst]
247247
----
248248

249-
["source","sql",subs="attributes,callouts,macros"]
249+
[source, sql]
250250
----
251251
include-tagged::{sql-specs}/docs.csv-spec[nullIfReturnNull]
252252
----
@@ -280,12 +280,12 @@ If all arguments are null, then it returns `null`.
280280

281281

282282

283-
["source","sql",subs="attributes,callouts,macros"]
283+
[source, sql]
284284
----
285285
include-tagged::{sql-specs}/docs.csv-spec[nvlReturnFirst]
286286
----
287287

288-
["source","sql",subs="attributes,callouts,macros"]
288+
[source, sql]
289289
----
290290
include-tagged::{sql-specs}/docs.csv-spec[nvlReturnSecond]
291291
----

docs/reference/sql/functions/date-time.asciidoc

+35-35
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,32 @@ s|Description
5757

5858
Basic arithmetic operators (`+`, `-`, etc) support date/time parameters as indicated below:
5959

60-
["source","sql",subs="attributes,callouts,macros"]
60+
[source, sql]
6161
--------------------------------------------------
6262
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalPlusInterval]
6363
--------------------------------------------------
6464

65-
["source","sql",subs="attributes,callouts,macros"]
65+
[source, sql]
6666
--------------------------------------------------
6767
include-tagged::{sql-specs}/docs.csv-spec[dtDateTimePlusInterval]
6868
--------------------------------------------------
6969

70-
["source","sql",subs="attributes,callouts,macros"]
70+
[source, sql]
7171
--------------------------------------------------
7272
include-tagged::{sql-specs}/docs.csv-spec[dtMinusInterval]
7373
--------------------------------------------------
7474

75-
["source","sql",subs="attributes,callouts,macros"]
75+
[source, sql]
7676
--------------------------------------------------
7777
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalMinusInterval]
7878
--------------------------------------------------
7979

80-
["source","sql",subs="attributes,callouts,macros"]
80+
[source, sql]
8181
--------------------------------------------------
8282
include-tagged::{sql-specs}/docs.csv-spec[dtDateTimeMinusInterval]
8383
--------------------------------------------------
8484

85-
["source","sql",subs="attributes,callouts,macros"]
85+
[source, sql]
8686
--------------------------------------------------
8787
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalMul]
8888
--------------------------------------------------
@@ -116,25 +116,25 @@ Unlike CURRENT_DATE, `CURDATE()` can only be used as a function with no argument
116116

117117
This method always returns the same value for its every occurrence within the same query.
118118

119-
["source","sql",subs="attributes,callouts,macros"]
119+
[source, sql]
120120
--------------------------------------------------
121121
include-tagged::{sql-specs}/docs.csv-spec[currentDate]
122122
--------------------------------------------------
123123

124-
["source","sql",subs="attributes,callouts,macros"]
124+
[source, sql]
125125
--------------------------------------------------
126126
include-tagged::{sql-specs}/docs.csv-spec[currentDateFunction]
127127
--------------------------------------------------
128128

129-
["source","sql",subs="attributes,callouts,macros"]
129+
[source, sql]
130130
--------------------------------------------------
131131
include-tagged::{sql-specs}/docs.csv-spec[curDateFunction]
132132
--------------------------------------------------
133133

134134
Typically, this function (as well as its twin <<sql-functions-today,TODAY())>> function
135135
is used for relative date filtering:
136136

137-
["source","sql",subs="attributes,callouts,macros"]
137+
[source, sql]
138138
--------------------------------------------------
139139
include-tagged::{sql-specs}/docs.csv-spec[filterToday]
140140
--------------------------------------------------
@@ -164,25 +164,25 @@ meaning a milliseconds precision current date/time will be returned.
164164

165165
This method always returns the same value for its every occurrence within the same query.
166166

167-
["source","sql",subs="attributes,callouts,macros"]
167+
[source, sql]
168168
--------------------------------------------------
169169
include-tagged::{sql-specs}/docs.csv-spec[curTs]
170170
--------------------------------------------------
171171

172-
["source","sql",subs="attributes,callouts,macros"]
172+
[source, sql]
173173
--------------------------------------------------
174174
include-tagged::{sql-specs}/docs.csv-spec[curTsFunction]
175175
--------------------------------------------------
176176

177-
["source","sql",subs="attributes,callouts,macros"]
177+
[source, sql]
178178
--------------------------------------------------
179179
include-tagged::{sql-specs}/docs.csv-spec[curTsFunctionPrecision]
180180
--------------------------------------------------
181181

182182
Typically, this function (as well as its twin <<sql-functions-now,NOW())>> function is used for
183183
relative date/time filtering:
184184

185-
["source","sql",subs="attributes,callouts,macros"]
185+
[source, sql]
186186
--------------------------------------------------
187187
include-tagged::{sql-specs}/docs.csv-spec[filterNow]
188188
--------------------------------------------------
@@ -210,7 +210,7 @@ DAY_OF_MONTH(datetime_exp) <1>
210210

211211
Extract the day of the month from a date/datetime.
212212

213-
["source","sql",subs="attributes,callouts,macros"]
213+
[source, sql]
214214
--------------------------------------------------
215215
include-tagged::{sql-specs}/docs.csv-spec[dayOfMonth]
216216
--------------------------------------------------
@@ -234,7 +234,7 @@ DAY_OF_WEEK(datetime_exp) <1>
234234

235235
Extract the day of the week from a date/datetime. Sunday is `1`, Monday is `2`, etc.
236236

237-
["source","sql",subs="attributes,callouts,macros"]
237+
[source, sql]
238238
--------------------------------------------------
239239
include-tagged::{sql-specs}/docs.csv-spec[dayOfWeek]
240240
--------------------------------------------------
@@ -258,7 +258,7 @@ DAY_OF_YEAR(datetime_exp) <1>
258258

259259
Extract the day of the year from a date/datetime.
260260

261-
["source","sql",subs="attributes,callouts,macros"]
261+
[source, sql]
262262
--------------------------------------------------
263263
include-tagged::{sql-specs}/docs.csv-spec[dayOfYear]
264264
--------------------------------------------------
@@ -282,7 +282,7 @@ DAY_NAME(datetime_exp) <1>
282282

283283
Extract the day of the week from a date/datetime in text format (`Monday`, `Tuesday`...).
284284

285-
["source","sql",subs="attributes,callouts,macros"]
285+
[source, sql]
286286
--------------------------------------------------
287287
include-tagged::{sql-specs}/docs.csv-spec[dayName]
288288
--------------------------------------------------
@@ -306,7 +306,7 @@ HOUR_OF_DAY(datetime_exp) <1>
306306

307307
Extract the hour of the day from a date/datetime.
308308

309-
["source","sql",subs="attributes,callouts,macros"]
309+
[source, sql]
310310
--------------------------------------------------
311311
include-tagged::{sql-specs}/docs.csv-spec[hourOfDay]
312312
--------------------------------------------------
@@ -331,7 +331,7 @@ ISO_DAY_OF_WEEK(datetime_exp) <1>
331331
Extract the day of the week from a date/datetime, following the https://en.wikipedia.org/wiki/ISO_week_date[ISO 8601 standard].
332332
Monday is `1`, Tuesday is `2`, etc.
333333

334-
["source","sql",subs="attributes,callouts,macros"]
334+
[source, sql]
335335
--------------------------------------------------
336336
include-tagged::{sql-specs}/docs.csv-spec[isoDayOfWeek]
337337
--------------------------------------------------
@@ -356,7 +356,7 @@ ISO_WEEK_OF_YEAR(datetime_exp) <1>
356356
Extract the week of the year from a date/datetime, following https://en.wikipedia.org/wiki/ISO_week_date[ISO 8601 standard]. The first week
357357
of a year is the first week with a majority (4 or more) of its days in January.
358358

359-
["source","sql",subs="attributes,callouts,macros"]
359+
[source, sql]
360360
--------------------------------------------------
361361
include-tagged::{sql-specs}/docs.csv-spec[isoWeekOfYear]
362362
--------------------------------------------------
@@ -380,7 +380,7 @@ MINUTE_OF_DAY(datetime_exp) <1>
380380

381381
Extract the minute of the day from a date/datetime.
382382

383-
["source","sql",subs="attributes,callouts,macros"]
383+
[source, sql]
384384
--------------------------------------------------
385385
include-tagged::{sql-specs}/docs.csv-spec[minuteOfDay]
386386
--------------------------------------------------
@@ -404,7 +404,7 @@ MINUTE_OF_HOUR(datetime_exp) <1>
404404

405405
Extract the minute of the hour from a date/datetime.
406406

407-
["source","sql",subs="attributes,callouts,macros"]
407+
[source, sql]
408408
--------------------------------------------------
409409
include-tagged::{sql-specs}/docs.csv-spec[minuteOfHour]
410410
--------------------------------------------------
@@ -428,7 +428,7 @@ MONTH(datetime_exp) <1>
428428

429429
Extract the month of the year from a date/datetime.
430430

431-
["source","sql",subs="attributes,callouts,macros"]
431+
[source, sql]
432432
--------------------------------------------------
433433
include-tagged::{sql-specs}/docs.csv-spec[monthOfYear]
434434
--------------------------------------------------
@@ -452,7 +452,7 @@ MONTH_NAME(datetime_exp) <1>
452452

453453
Extract the month from a date/datetime in text format (`January`, `February`...).
454454

455-
["source","sql",subs="attributes,callouts,macros"]
455+
[source, sql]
456456
--------------------------------------------------
457457
include-tagged::{sql-specs}/docs.csv-spec[monthName]
458458
--------------------------------------------------
@@ -476,15 +476,15 @@ This function offers the same functionality as <<sql-functions-current-timestamp
476476
the datetime when the current query reached the server. This method always returns the same value for its every
477477
occurrence within the same query.
478478

479-
["source","sql",subs="attributes,callouts,macros"]
479+
[source, sql]
480480
--------------------------------------------------
481481
include-tagged::{sql-specs}/docs.csv-spec[nowFunction]
482482
--------------------------------------------------
483483

484484
Typically, this function (as well as its twin <<sql-functions-current-timestamp,CURRENT_TIMESTAMP())>> function is used
485485
for relative date/time filtering:
486486

487-
["source","sql",subs="attributes,callouts,macros"]
487+
[source, sql]
488488
--------------------------------------------------
489489
include-tagged::{sql-specs}/docs.csv-spec[filterNow]
490490
--------------------------------------------------
@@ -508,7 +508,7 @@ SECOND_OF_MINUTE(datetime_exp) <1>
508508

509509
Extract the second of the minute from a date/datetime.
510510

511-
["source","sql",subs="attributes,callouts,macros"]
511+
[source, sql]
512512
--------------------------------------------------
513513
include-tagged::{sql-specs}/docs.csv-spec[secondOfMinute]
514514
--------------------------------------------------
@@ -532,7 +532,7 @@ QUARTER(datetime_exp) <1>
532532

533533
Extract the year quarter the date/datetime falls in.
534534

535-
["source","sql",subs="attributes,callouts,macros"]
535+
[source, sql]
536536
--------------------------------------------------
537537
include-tagged::{sql-specs}/docs.csv-spec[quarter]
538538
--------------------------------------------------
@@ -556,15 +556,15 @@ This function offers the same functionality as <<sql-functions-current-date,CURR
556556
the date when the current query reached the server. This method always returns the same value for its every occurrence
557557
within the same query.
558558

559-
["source","sql",subs="attributes,callouts,macros"]
559+
[source, sql]
560560
--------------------------------------------------
561561
include-tagged::{sql-specs}/docs.csv-spec[todayFunction]
562562
--------------------------------------------------
563563

564564
Typically, this function (as well as its twin <<sql-functions-current-timestamp,CURRENT_TIMESTAMP())>> function is used
565565
for relative date filtering:
566566

567-
["source","sql",subs="attributes,callouts,macros"]
567+
[source, sql]
568568
--------------------------------------------------
569569
include-tagged::{sql-specs}/docs.csv-spec[filterToday]
570570
--------------------------------------------------
@@ -588,7 +588,7 @@ WEEK_OF_YEAR(datetime_exp) <1>
588588

589589
Extract the week of the year from a date/datetime.
590590

591-
["source","sql",subs="attributes,callouts,macros"]
591+
[source, sql]
592592
--------------------------------------------------
593593
include-tagged::{sql-specs}/docs.csv-spec[weekOfYear]
594594
--------------------------------------------------
@@ -612,7 +612,7 @@ YEAR(datetime_exp) <1>
612612

613613
Extract the year from a date/datetime.
614614

615-
["source","sql",subs="attributes,callouts,macros"]
615+
[source, sql]
616616
--------------------------------------------------
617617
include-tagged::{sql-specs}/docs.csv-spec[year]
618618
--------------------------------------------------
@@ -640,14 +640,14 @@ EXTRACT(
640640
Extract fields from a date/datetime by specifying the name of a <<sql-functions-datetime,datetime function>>.
641641
The following
642642

643-
["source","sql",subs="attributes,callouts,macros"]
643+
[source, sql]
644644
--------------------------------------------------
645645
include-tagged::{sql-specs}/docs.csv-spec[extractDayOfYear]
646646
--------------------------------------------------
647647

648648
is the equivalent to
649649

650-
["source","sql",subs="attributes,callouts,macros"]
650+
[source, sql]
651651
--------------------------------------------------
652652
include-tagged::{sql-specs}/docs.csv-spec[dayOfYear]
653653
--------------------------------------------------

0 commit comments

Comments
 (0)