What a backend is asked to do.
A plan is a plain list of these, carried out in order. They say nothing about
HTTP or about Google: Sheetshow.Memory interprets them in a map, and a
backend encodes them as requests.
| Op | What it does |
|---|---|
Sheetshow.Op.AddSheet | adds a tab |
Sheetshow.Op.DeleteSheet | removes one |
Sheetshow.Op.PutCells | writes one run of cells along a row |
Sheetshow.Op.AppendRows | adds rows below the last row with data |
Sheetshow.Op.DeleteRows | removes rows, the ones below moving up |
Sheetshow.Op.SetDimensions | sets column widths or row heights |
Every op names the sheet it works on, so the cells inside one are placed by row and column alone and their coordinates carry no sheet of their own. The constructors take cells that do and strip them.
Summary
Functions
Every op struct, for guards and tests.
Whether the term is one of the ops.
The sheet an op works on.
Types
@type plan() :: [t()]
@type t() :: Sheetshow.Op.AddSheet.t() | Sheetshow.Op.AppendRows.t() | Sheetshow.Op.DeleteRows.t() | Sheetshow.Op.DeleteSheet.t() | Sheetshow.Op.PutCells.t() | Sheetshow.Op.SetDimensions.t()
Functions
@spec modules() :: [module()]
Every op struct, for guards and tests.
Whether the term is one of the ops.
iex> Sheetshow.Op.op?(Sheetshow.Op.AddSheet.new("Costs"))
true
iex> Sheetshow.Op.op?(:add_sheet)
false
The sheet an op works on.
iex> Sheetshow.Op.sheet(Sheetshow.Op.AddSheet.new("Costs"))
"Costs"
iex> Sheetshow.Op.sheet(Sheetshow.Op.DeleteRows.new("log", 2..4))
"log"