Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Table type #1
This issue covers the proposed design and tradeoffs in the neugram table type.
A data table, or frame, is an two-dimensional data set arranged in columns.
Columns can be named. The intention is a typical program understands the set of columns statically, but this is not required (and so not baked into the static type system).
Table is an abstract type. Any concrete type satisfying an equivalent method set can be used as a table.
The table does not have to be in memory, or on the local machine. Operations can return errors. Neugram will ship with a table implementation built on SQL. In general, tables can be understood as language-specific syntax for working with SQL tables. Nowhere near all SQL features are supported and there are some important semantic differences that make only a subset of SQL tables suitable treating as a neugram table, specifically, rows are ordered in a neugram table, and neugram has no notion of primary keys.
Type and slice syntax
The syntax for a table type is
For slicing, a table uses the same comma-separated syntax described in the Go multi-dimensional slice proposal: https://github.com/golang/proposal/blob/master/design/6282-table-data.md
Every table over data of type T must implement:
A table can optionally implement more methods:
Builtin make memory tables
The builtin function make can be used to create in-memory data tables.
(The first comment of this issue is kept up-to-date with the current proposal.