1 | ---
|
2 | in_progress: yes
|
3 | default_highlighter: oils-sh
|
4 | body_css_class: width50
|
5 | ---
|
6 |
|
7 | Tables, Object, and Documents - Notation, Query, Creation, Schema
|
8 | =============================
|
9 |
|
10 | <style>
|
11 | thead {
|
12 | background-color: #eee;
|
13 | font-weight: bold;
|
14 | text-align: left;
|
15 | }
|
16 | table {
|
17 | font-family: sans-serif;
|
18 | border-collapse: collapse;
|
19 | }
|
20 |
|
21 | tr {
|
22 | border-bottom: solid 1px;
|
23 | border-color: #ddd;
|
24 | }
|
25 |
|
26 | td {
|
27 | padding: 8px; /* override default of 5px */
|
28 | }
|
29 | </style>
|
30 |
|
31 | This is part of **maximal** YSH!
|
32 |
|
33 | <div id="toc">
|
34 | </div>
|
35 |
|
36 | ## Tables
|
37 |
|
38 |
|
39 | <table>
|
40 |
|
41 | - thead
|
42 | - Data Type
|
43 | - Notation
|
44 | - Query
|
45 | - Creation
|
46 | - Schema
|
47 | - tr
|
48 | - Table
|
49 | - TSV, CSV
|
50 | - csvkit, xsv, awk-ish, etc. <br/>
|
51 | SQL, Data Frames
|
52 | - ?
|
53 | - ?
|
54 | - tr
|
55 | - Object
|
56 | - JSON
|
57 | - jq <br/>
|
58 | JSONPath: MySQL/Postgres/sqlite support it?
|
59 | - jq
|
60 | - JSON Schema
|
61 | - tr
|
62 | - Document
|
63 | - HTML5, XML
|
64 | - DOM API like getElementById() <br/>
|
65 | CSS selectors <br/>
|
66 | XPath?
|
67 | - JSX Templates
|
68 | - XML Schema?
|
69 |
|
70 | <!-- TODO: ul-table should allow caption at the top -->
|
71 | <caption>Existing</caption>
|
72 |
|
73 | </table>
|
74 |
|
75 |
|
76 |
|
77 | <table>
|
78 |
|
79 | - thead
|
80 | - Data Type
|
81 | - Notation
|
82 | - Query
|
83 | - Creation
|
84 | - Schema
|
85 | - In-Memory
|
86 | - tr
|
87 | - Table
|
88 | - TSV8 (is valid TSV)
|
89 | - dplyr-like Data Frames <br/>
|
90 | Maybe some SQL-pipe subset thing?
|
91 | - `table { }`
|
92 | - ?
|
93 | - By column: dict of "arrays" <br/>
|
94 | By row: list of dicts <br/>
|
95 | - tr
|
96 | - Object
|
97 | - JSON8 (superset)
|
98 | - JSONPath? <br/>
|
99 | jq as a reshaping language
|
100 | - Hay? `Package { }`
|
101 | - JSON Schema?
|
102 | - List and Dict
|
103 | - tr
|
104 | - Document
|
105 | - HTM8 (subset)
|
106 | - CSS selectors
|
107 | - Markaby Style `div { }` <br/>
|
108 | "sed" style
|
109 | - ?
|
110 | - DocFrag - a span within a doc<br/>
|
111 | DocTree - an Obj representation<br/>
|
112 | ?
|
113 |
|
114 | <caption>Oils</caption>
|
115 |
|
116 | </table>
|
117 |
|
118 | ## Note: SQL Databases Support all three models!
|
119 |
|
120 | - sqlite, MySQL, and PostGres obviously have tables
|
121 | - They all have JSON and JSONPath support!
|
122 | - JSONPath syntax might differ a bit?
|
123 | - XML support
|
124 | - Postgres: XML type, XPath, more
|
125 | - MySQL: XML extraction functions only
|
126 | - sqlite: none
|
127 |
|
128 | ## Related
|
129 |
|
130 | - [stream-table-process.html](stream-table-process.html)
|
131 | - [ysh-doc-processing.html](ysh-doc-processing.html)
|