Skip to content

Commit

Permalink
Add temporary table.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithrandie committed Jul 10, 2017
1 parent 04e540b commit 7e6c991
Show file tree
Hide file tree
Showing 12 changed files with 6,172 additions and 5,844 deletions.
1 change: 1 addition & 0 deletions docs/_includes/side_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<li><a href="{{ '/reference/variable.html' | relative_url }}">Variable</a></li>
<li><a href="{{ '/reference/row-value.html' | relative_url }}">Row Value</a></li>
<li><a href="{{ '/reference/cursor.html' | relative_url }}">Cursor</a></li>
<li><a href="{{ '/reference/temporary-table.html' | relative_url }}">Temporary Table</a></li>
<li><a href="{{ '/reference/control-flow.html' | relative_url }}">Control Flow</a></li>
<li><a href="{{ '/reference/transaction.html' | relative_url }}">Transaction Management</a></li>
<li><a href="{{ '/reference/built-in.html' | relative_url }}">Built-in Commands</a></li>
Expand Down
26 changes: 26 additions & 0 deletions docs/_posts/2006-01-02-temporary-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: default
title: Temporary Table - Reference Manual - csvq
category: reference
---

# Temporary Table

A Temporary Table is a temporary view that can be used in a procedure.
You can refer, insert, update, or delete temporary tables.

## Declare Temporary Table
{: #declare}

```sql
DECLARE table_name TABLE [(column_name [, column_name ...])] FOR select_query;
```

_table_name_
: [identifier]({{ '/reference/statement.html#parsing' | relative_url }})

_column_name_
: [identifier]({{ '/reference/statement.html#parsing' | relative_url }})

_select_query_
: [Select Query]({{ '/reference/select-query.html' | relative_url }})
1 change: 1 addition & 0 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ title: Reference Manual - csvq
* [Variable]({{ '/reference/variable.html' | relative_url }})
* [Row Value]({{ '/reference/row-value.html' | relative_url }})
* [Cursor]({{ '/reference/cursor.html' | relative_url }})
* [Temporary Table]({{ '/reference/temporary-table.html' | relative_url }})
* [Control Flow]({{ '/reference/control-flow.html' | relative_url }})
* [Transaction Management]({{ '/reference/transaction.html' | relative_url }})
* [Built-in Commands]({{ '/reference/built-in.html' | relative_url }})
Expand Down
6 changes: 5 additions & 1 deletion docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</url>
<url>
<loc>https://mithrandie.github.io/csvq/reference.html</loc>
<lastmod>2017-07-05T21:28:49+00:00</lastmod>
<lastmod>2017-07-10T05:11:55+00:00</lastmod>
</url>
<url>
<loc>https://mithrandie.github.io/csvq/reference/install.html</loc>
Expand Down Expand Up @@ -68,6 +68,10 @@
<loc>https://mithrandie.github.io/csvq/reference/cursor.html</loc>
<lastmod>2017-06-29T17:08:49+00:00</lastmod>
</url>
<url>
<loc>https://mithrandie.github.io/csvq/reference/temporary-table.html</loc>
<lastmod>2017-07-10T05:11:55+00:00</lastmod>
</url>
<url>
<loc>https://mithrandie.github.io/csvq/reference/control-flow.html</loc>
<lastmod>2017-07-06T20:38:36+00:00</lastmod>
Expand Down
6 changes: 6 additions & 0 deletions lib/parser/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,12 @@ func (e CursorStatus) String() string {
return joinWithSpace(s)
}

type TableDeclaration struct {
Table Identifier
Fields []Expression
Query Expression
}

type TransactionControl struct {
Token int
}
Expand Down
Loading

0 comments on commit 7e6c991

Please sign in to comment.