Add an example of including sql from docs

Original commit: elastic/x-pack-elasticsearch@aa4ad288dc
This commit is contained in:
Nik Everett 2017-08-29 15:32:44 -04:00
parent 810ca6637e
commit efc876c8e1
3 changed files with 17 additions and 3 deletions

View File

@ -2,6 +2,8 @@
[[xpack-sql]] [[xpack-sql]]
= SQL Access = SQL Access
:jdbc-tests: {docdir}/../../sql/jdbc/src/test/resources
[partintro] [partintro]
-- --
Overview Overview
@ -11,4 +13,6 @@ Overview
include::sql-query-dsl.asciidoc[] include::sql-query-dsl.asciidoc[]
include::sql-rest.asciidoc[] include::sql-rest.asciidoc[]
include::sql-jdbc.asciidoc[] include::sql-jdbc.asciidoc[]
include::sql-cli.asciidoc[] include::sql-cli.asciidoc[]
:jdbc-tests!:

View File

@ -2,4 +2,12 @@
[[sql-query-dsl]] [[sql-query-dsl]]
== SQL Query DSL == SQL Query DSL
Content Content
Example!
["source","sql",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{jdbc-tests}/select.sql-spec[wildcardWithOrder]
--------------------------------------------------

View File

@ -3,7 +3,9 @@
// //
wildcardWithOrder wildcardWithOrder
SELECT * FROM "test_emp" ORDER BY emp_no; // tag::wildcardWithOrder
SELECT * FROM test_emp ORDER BY emp_no;
// end::wildcardWithOrder
column column
SELECT last_name FROM "test_emp" ORDER BY emp_no; SELECT last_name FROM "test_emp" ORDER BY emp_no;
columnWithAlias columnWithAlias