update inbox list
This commit is contained in:
17
vendor/scrivo/highlight.php/test/markup/sql/interval.expect.txt
vendored
Normal file
17
vendor/scrivo/highlight.php/test/markup/sql/interval.expect.txt
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<span class="hljs-keyword">SELECT</span>
|
||||
<span class="hljs-keyword">CURRENT_TIMESTAMP</span>
|
||||
- <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">2</span> <span class="hljs-keyword">YEARS</span>
|
||||
+ <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">1</span> <span class="hljs-keyword">MONTH</span>
|
||||
- <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">3</span> <span class="hljs-keyword">DAYS</span>
|
||||
+ <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">10</span> <span class="hljs-keyword">HOURS</span>
|
||||
+ <span class="hljs-built_in">interval</span> <span class="hljs-number">30</span> <span class="hljs-keyword">MINUTES</span>
|
||||
- <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">20</span> <span class="hljs-keyword">SECOND</span> <span class="hljs-keyword">AS</span> past_timestamp
|
||||
<span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span> (<span class="hljs-string">"dummy"</span>);
|
||||
|
||||
<span class="hljs-keyword">WITH</span> ts <span class="hljs-keyword">AS</span> (
|
||||
<span class="hljs-keyword">SELECT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> <span class="hljs-keyword">AS</span> <span class="hljs-keyword">now</span> <span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span> (<span class="hljs-string">'dummy'</span>)
|
||||
)
|
||||
<span class="hljs-keyword">SELECT</span>
|
||||
<span class="hljs-keyword">now</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">1</span> <span class="hljs-keyword">DAY</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">2</span> <span class="hljs-keyword">HOURS</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">3</span> <span class="hljs-keyword">MINUTES</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">4</span> <span class="hljs-keyword">SECONDS</span> <span class="hljs-keyword">AS</span> LONG_VERSION,
|
||||
<span class="hljs-keyword">now</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-string">'1 2:3:4.100'</span> <span class="hljs-keyword">DAY</span> <span class="hljs-keyword">TO</span> <span class="hljs-keyword">SECOND</span> <span class="hljs-keyword">AS</span> SHORT_VERSION
|
||||
<span class="hljs-keyword">FROM</span> ts;
|
||||
17
vendor/scrivo/highlight.php/test/markup/sql/interval.txt
vendored
Normal file
17
vendor/scrivo/highlight.php/test/markup/sql/interval.txt
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
SELECT
|
||||
CURRENT_TIMESTAMP
|
||||
- INTERVAL 2 YEARS
|
||||
+ INTERVAL 1 MONTH
|
||||
- INTERVAL 3 DAYS
|
||||
+ INTERVAL 10 HOURS
|
||||
+ interval 30 MINUTES
|
||||
- INTERVAL 20 SECOND AS past_timestamp
|
||||
FROM VALUES ("dummy");
|
||||
|
||||
WITH ts AS (
|
||||
SELECT CURRENT_TIMESTAMP AS now FROM VALUES ('dummy')
|
||||
)
|
||||
SELECT
|
||||
now - INTERVAL 1 DAY - INTERVAL 2 HOURS - INTERVAL 3 MINUTES - INTERVAL 4 SECONDS AS LONG_VERSION,
|
||||
now - INTERVAL '1 2:3:4.100' DAY TO SECOND AS SHORT_VERSION
|
||||
FROM ts;
|
||||
17
vendor/scrivo/highlight.php/test/markup/sql/join.expect.txt
vendored
Normal file
17
vendor/scrivo/highlight.php/test/markup/sql/join.expect.txt
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<span class="hljs-keyword">SELECT</span>
|
||||
left_table.col1 <span class="hljs-keyword">AS</span> l_col1,
|
||||
left_table.col2 <span class="hljs-keyword">AS</span> l_col2
|
||||
<span class="hljs-keyword">FROM</span>
|
||||
<span class="hljs-keyword">VALUES</span> (<span class="hljs-number">0</span>, <span class="hljs-number">10</span>), (<span class="hljs-number">1</span>, <span class="hljs-number">11</span>), (<span class="hljs-number">2</span>, <span class="hljs-number">12</span>), (<span class="hljs-number">3</span>,<span class="hljs-number">13</span>), (<span class="hljs-number">4</span>, <span class="hljs-number">14</span>), (<span class="hljs-number">5</span>, <span class="hljs-number">14</span>) <span class="hljs-keyword">AS</span> left_table
|
||||
<span class="hljs-keyword">ANTI</span> <span class="hljs-keyword">JOIN</span>
|
||||
<span class="hljs-keyword">VALUES</span> (<span class="hljs-number">0</span>, <span class="hljs-number">10</span>), (<span class="hljs-number">2</span>, <span class="hljs-number">12</span>), (<span class="hljs-number">4</span>, <span class="hljs-number">14</span>), (<span class="hljs-number">6</span>, <span class="hljs-number">16</span>) <span class="hljs-keyword">AS</span> right_table
|
||||
<span class="hljs-keyword">ON</span> left_table.col1 = right_table.col1;
|
||||
|
||||
<span class="hljs-keyword">SELECT</span>
|
||||
left_table.col1 <span class="hljs-keyword">AS</span> l_col1,
|
||||
left_table.col2 <span class="hljs-keyword">AS</span> l_col2
|
||||
<span class="hljs-keyword">FROM</span>
|
||||
<span class="hljs-keyword">VALUES</span> (<span class="hljs-number">0</span>, <span class="hljs-number">10</span>), (<span class="hljs-number">1</span>, <span class="hljs-number">11</span>), (<span class="hljs-number">2</span>, <span class="hljs-number">12</span>), (<span class="hljs-number">3</span>,<span class="hljs-number">13</span>), (<span class="hljs-number">4</span>, <span class="hljs-number">14</span>), (<span class="hljs-number">5</span>, <span class="hljs-number">14</span>) <span class="hljs-keyword">AS</span> left_table
|
||||
<span class="hljs-keyword">LEFT</span> <span class="hljs-keyword">SEMI</span> <span class="hljs-keyword">JOIN</span>
|
||||
<span class="hljs-keyword">VALUES</span> (<span class="hljs-number">0</span>, <span class="hljs-number">10</span>), (<span class="hljs-number">2</span>, <span class="hljs-number">12</span>), (<span class="hljs-number">4</span>, <span class="hljs-number">14</span>), (<span class="hljs-number">6</span>, <span class="hljs-number">16</span>) <span class="hljs-keyword">AS</span> right_table
|
||||
<span class="hljs-keyword">ON</span> left_table.col1 = right_table.col1;
|
||||
17
vendor/scrivo/highlight.php/test/markup/sql/join.txt
vendored
Normal file
17
vendor/scrivo/highlight.php/test/markup/sql/join.txt
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
SELECT
|
||||
left_table.col1 AS l_col1,
|
||||
left_table.col2 AS l_col2
|
||||
FROM
|
||||
VALUES (0, 10), (1, 11), (2, 12), (3,13), (4, 14), (5, 14) AS left_table
|
||||
ANTI JOIN
|
||||
VALUES (0, 10), (2, 12), (4, 14), (6, 16) AS right_table
|
||||
ON left_table.col1 = right_table.col1;
|
||||
|
||||
SELECT
|
||||
left_table.col1 AS l_col1,
|
||||
left_table.col2 AS l_col2
|
||||
FROM
|
||||
VALUES (0, 10), (1, 11), (2, 12), (3,13), (4, 14), (5, 14) AS left_table
|
||||
LEFT SEMI JOIN
|
||||
VALUES (0, 10), (2, 12), (4, 14), (6, 16) AS right_table
|
||||
ON left_table.col1 = right_table.col1;
|
||||
1
vendor/scrivo/highlight.php/test/markup/sql/keywords.expect.txt
vendored
Normal file
1
vendor/scrivo/highlight.php/test/markup/sql/keywords.expect.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<span class="hljs-keyword">select</span> * <span class="hljs-keyword">from</span> t <span class="hljs-keyword">where</span> t.select <span class="hljs-keyword">is</span> <span class="hljs-literal">null</span>;
|
||||
1
vendor/scrivo/highlight.php/test/markup/sql/keywords.txt
vendored
Normal file
1
vendor/scrivo/highlight.php/test/markup/sql/keywords.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
select * from t where t.select is null;
|
||||
7
vendor/scrivo/highlight.php/test/markup/sql/lateral-view.expect.txt
vendored
Normal file
7
vendor/scrivo/highlight.php/test/markup/sql/lateral-view.expect.txt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<span class="hljs-keyword">SELECT</span>
|
||||
master_child.col1 <span class="hljs-keyword">AS</span> master_id,
|
||||
child_table.child_id
|
||||
<span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span>
|
||||
( <span class="hljs-number">1</span> , <span class="hljs-built_in">ARRAY</span>(<span class="hljs-number">1</span>,<span class="hljs-number">2</span>,<span class="hljs-number">3</span>)),
|
||||
(<span class="hljs-number">2</span>, <span class="hljs-built_in">ARRAY</span>(<span class="hljs-number">4</span>,<span class="hljs-number">5</span>,<span class="hljs-number">6</span>)) <span class="hljs-keyword">AS</span> master_child
|
||||
<span class="hljs-keyword">LATERAL</span> <span class="hljs-keyword">VIEW</span> <span class="hljs-keyword">EXPLODE</span>(master_child.col2) child_table <span class="hljs-keyword">AS</span> child_id;
|
||||
7
vendor/scrivo/highlight.php/test/markup/sql/lateral-view.txt
vendored
Normal file
7
vendor/scrivo/highlight.php/test/markup/sql/lateral-view.txt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
SELECT
|
||||
master_child.col1 AS master_id,
|
||||
child_table.child_id
|
||||
FROM VALUES
|
||||
( 1 , ARRAY(1,2,3)),
|
||||
(2, ARRAY(4,5,6)) AS master_child
|
||||
LATERAL VIEW EXPLODE(master_child.col2) child_table AS child_id;
|
||||
1
vendor/scrivo/highlight.php/test/markup/sql/numeric-types.expect.txt
vendored
Normal file
1
vendor/scrivo/highlight.php/test/markup/sql/numeric-types.expect.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<span class="hljs-keyword">SELECT</span> <span class="hljs-keyword">CAST</span>(<span class="hljs-number">32768</span> <span class="hljs-keyword">AS</span> <span class="hljs-built_in">TINYINT</span>) <span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span>(<span class="hljs-string">'dummy'</span>);
|
||||
1
vendor/scrivo/highlight.php/test/markup/sql/numeric-types.txt
vendored
Normal file
1
vendor/scrivo/highlight.php/test/markup/sql/numeric-types.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT CAST(32768 AS TINYINT) FROM VALUES('dummy');
|
||||
1
vendor/scrivo/highlight.php/test/markup/sql/set-operator.expect.txt
vendored
Normal file
1
vendor/scrivo/highlight.php/test/markup/sql/set-operator.expect.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span> <span class="hljs-number">1</span>, <span class="hljs-number">2</span> ,<span class="hljs-number">3</span> <span class="hljs-keyword">UNION</span> <span class="hljs-keyword">ALL</span> <span class="hljs-keyword">VALUES</span> <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>;
|
||||
1
vendor/scrivo/highlight.php/test/markup/sql/set-operator.txt
vendored
Normal file
1
vendor/scrivo/highlight.php/test/markup/sql/set-operator.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT * FROM VALUES 1, 2 ,3 UNION ALL VALUES 1, 2, 3;
|
||||
5
vendor/scrivo/highlight.php/test/markup/sql/string-types.expect.txt
vendored
Normal file
5
vendor/scrivo/highlight.php/test/markup/sql/string-types.expect.txt
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<span class="hljs-keyword">SELECT</span> <span class="hljs-string">'\'</span>;
|
||||
|
||||
<span class="hljs-keyword">SELECT</span> <span class="hljs-string">"\"</span>;
|
||||
|
||||
<span class="hljs-keyword">SELECT</span> <span class="hljs-string">`\`</span>;
|
||||
5
vendor/scrivo/highlight.php/test/markup/sql/string-types.txt
vendored
Normal file
5
vendor/scrivo/highlight.php/test/markup/sql/string-types.txt
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
SELECT '\';
|
||||
|
||||
SELECT "\";
|
||||
|
||||
SELECT `\`;
|
||||
5
vendor/scrivo/highlight.php/test/markup/sql/tablesample.expect.txt
vendored
Normal file
5
vendor/scrivo/highlight.php/test/markup/sql/tablesample.expect.txt
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> orders <span class="hljs-keyword">TABLESAMPLE</span> (<span class="hljs-number">500</span> <span class="hljs-keyword">ROWS</span>);
|
||||
|
||||
<span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> customers <span class="hljs-keyword">TABLESAMPLE</span> (<span class="hljs-number">25</span> <span class="hljs-keyword">PERCENT</span>);
|
||||
|
||||
<span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> employees <span class="hljs-keyword">TABLESAMPLE</span> (<span class="hljs-keyword">BUCKET</span> <span class="hljs-number">2</span> <span class="hljs-keyword">OUT</span> <span class="hljs-keyword">OF</span> <span class="hljs-number">10</span>);
|
||||
5
vendor/scrivo/highlight.php/test/markup/sql/tablesample.txt
vendored
Normal file
5
vendor/scrivo/highlight.php/test/markup/sql/tablesample.txt
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
SELECT * FROM orders TABLESAMPLE (500 ROWS);
|
||||
|
||||
SELECT * FROM customers TABLESAMPLE (25 PERCENT);
|
||||
|
||||
SELECT * FROM employees TABLESAMPLE (BUCKET 2 OUT OF 10);
|
||||
7
vendor/scrivo/highlight.php/test/markup/sql/values-statement.expect.txt
vendored
Normal file
7
vendor/scrivo/highlight.php/test/markup/sql/values-statement.expect.txt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<span class="hljs-keyword">VALUES</span> <span class="hljs-number">1</span>, <span class="hljs-number">2</span> , <span class="hljs-number">3</span>;
|
||||
|
||||
<span class="hljs-keyword">VALUES</span>
|
||||
(<span class="hljs-number">1</span>, <span class="hljs-string">'Spock'</span>),
|
||||
(<span class="hljs-number">2</span>,<span class="hljs-string">'Kirk'</span>) ,
|
||||
(<span class="hljs-number">3</span>, <span class="hljs-string">'McCoy'</span>),
|
||||
(<span class="hljs-number">4</span>,<span class="hljs-string">'Scotty'</span>);
|
||||
7
vendor/scrivo/highlight.php/test/markup/sql/values-statement.txt
vendored
Normal file
7
vendor/scrivo/highlight.php/test/markup/sql/values-statement.txt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
VALUES 1, 2 , 3;
|
||||
|
||||
VALUES
|
||||
(1, 'Spock'),
|
||||
(2,'Kirk') ,
|
||||
(3, 'McCoy'),
|
||||
(4,'Scotty');
|
||||
23
vendor/scrivo/highlight.php/test/markup/sql/window-function.expect.txt
vendored
Normal file
23
vendor/scrivo/highlight.php/test/markup/sql/window-function.expect.txt
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<span class="hljs-keyword">SELECT</span> *
|
||||
<span class="hljs-keyword">FROM</span> (
|
||||
<span class="hljs-keyword">SELECT</span>
|
||||
posts.col1 <span class="hljs-keyword">AS</span> emp_id,
|
||||
posts.col2 <span class="hljs-keyword">AS</span> dept_id,
|
||||
posts.col3 <span class="hljs-keyword">AS</span> posts,
|
||||
<span class="hljs-keyword">DENSE_RANK</span>() <span class="hljs-keyword">OVER</span> post_ranking <span class="hljs-keyword">AS</span> <span class="hljs-keyword">rank</span>
|
||||
<span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span>
|
||||
(<span class="hljs-number">1</span>, <span class="hljs-number">1</span> ,<span class="hljs-number">100</span>),
|
||||
(<span class="hljs-number">2</span>, <span class="hljs-number">1</span> ,<span class="hljs-number">50</span>),
|
||||
(<span class="hljs-number">8</span>, <span class="hljs-number">1</span> ,<span class="hljs-number">250</span>),
|
||||
(<span class="hljs-number">3</span>, <span class="hljs-number">2</span> ,<span class="hljs-number">200</span>),
|
||||
(<span class="hljs-number">4</span>, <span class="hljs-number">2</span> ,<span class="hljs-number">300</span>),
|
||||
(<span class="hljs-number">9</span>, <span class="hljs-number">2</span> ,<span class="hljs-number">1000</span>),
|
||||
(<span class="hljs-number">5</span>, <span class="hljs-number">3</span> ,<span class="hljs-number">300</span>),
|
||||
(<span class="hljs-number">6</span>, <span class="hljs-number">3</span> ,<span class="hljs-number">100</span>),
|
||||
(<span class="hljs-number">7</span>, <span class="hljs-number">3</span> ,<span class="hljs-number">400</span>) <span class="hljs-keyword">AS</span> posts
|
||||
<span class="hljs-keyword">WINDOW</span> post_ranking <span class="hljs-keyword">AS</span> (
|
||||
<span class="hljs-keyword">PARTITION</span> <span class="hljs-keyword">BY</span> posts.col2
|
||||
<span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> posts.col3 <span class="hljs-keyword">DESC</span>
|
||||
<span class="hljs-keyword">ROWS</span> <span class="hljs-keyword">BETWEEN</span> <span class="hljs-keyword">UNBOUNDED</span> <span class="hljs-keyword">PRECEDING</span> <span class="hljs-keyword">AND</span> <span class="hljs-keyword">CURRENT</span> <span class="hljs-keyword">ROW</span>)
|
||||
)
|
||||
<span class="hljs-keyword">WHERE</span> <span class="hljs-keyword">rank</span> <= <span class="hljs-number">2</span>;
|
||||
23
vendor/scrivo/highlight.php/test/markup/sql/window-function.txt
vendored
Normal file
23
vendor/scrivo/highlight.php/test/markup/sql/window-function.txt
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
posts.col1 AS emp_id,
|
||||
posts.col2 AS dept_id,
|
||||
posts.col3 AS posts,
|
||||
DENSE_RANK() OVER post_ranking AS rank
|
||||
FROM VALUES
|
||||
(1, 1 ,100),
|
||||
(2, 1 ,50),
|
||||
(8, 1 ,250),
|
||||
(3, 2 ,200),
|
||||
(4, 2 ,300),
|
||||
(9, 2 ,1000),
|
||||
(5, 3 ,300),
|
||||
(6, 3 ,100),
|
||||
(7, 3 ,400) AS posts
|
||||
WINDOW post_ranking AS (
|
||||
PARTITION BY posts.col2
|
||||
ORDER BY posts.col3 DESC
|
||||
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
|
||||
)
|
||||
WHERE rank <= 2;
|
||||
Reference in New Issue
Block a user