inline_sql_syntax icon indicating copy to clipboard operation
inline_sql_syntax copied to clipboard

Support for YAML

Open Jeromearsene opened this issue 3 years ago • 1 comments

Like yaml-string-sql, purpose possibility to parse SQL in YAML.

Example:

Single request

   data: |
          --sql
          SELECT * FROM test;

Multiple requests

   data: |
          --sql-start
          SELECT * FROM test;
          SELECT COUNT(*) from test_2;
          --sql-end

Jeromearsene avatar Jun 22 '22 10:06 Jeromearsene

That's interesting, thanks for opening issue! It might actually be cleaner without closing comment, even for multiple requests (using next yaml key as a closing anchor)?

   data: |
          --sql
          SELECT * FROM test;
          SELECT COUNT(*) from test_2;
   next_key: "This is not SQL"

I'll try to experiment if it's possible to hack something like this using TextMate.

barklan avatar Jun 23 '22 12:06 barklan