Data Types
Primitive Value
- string
 - blob
 - int64
 - float64
 - bool
 - null
 - list of primitive value // []*primitive_value
- 0-indexed
 
 - map of primitive value // map[string]*primitive_value
 - list of interface // Json Array []interface
{} - map of interface // Json Object map[string]interface
{} - undefined
 
Object Types
Error
- new Error(message, 
<name>) - name: "Error", "RangeError", "InternalError", "ReferenceError", "SyntaxError", "TypeError"
 
Time
- new Time() // create a time object. The value is set to current timestamp
 - new Time(epoch) // create a time object. The epoch could be second or millisecond
 - new Time(relativeTime) // create a time object from a relative time
 - new Time(layout, value, 
<location>) 
Time Layouts:
  ANSIC       = "Mon Jan _2 15:04:05 2006"
	UnixDate    = "Mon Jan _2 15:04:05 MST 2006"
	RubyDate    = "Mon Jan 02 15:04:05 -0700 2006"
	RFC822      = "02 Jan 06 15:04 MST"
	RFC822Z     = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone
	RFC850      = "Monday, 02-Jan-06 15:04:05 MST"
	RFC1123     = "Mon, 02 Jan 2006 15:04:05 MST"
	RFC1123Z    = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone
	RFC3339     = "2006-01-02T15:04:05Z07:00"
	RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00"
	Kitchen     = "3:04PM"
	// Handy time stamps.
	Stamp      = "Jan _2 15:04:05"
	StampMilli = "Jan _2 15:04:05.000"
	StampMicro = "Jan _2 15:04:05.000000"
	StampNano  = "Jan _2 15:04:05.000000000"
	DateTime   = "2006-01-02 15:04:05"
	DateOnly   = "2006-01-02"
	TimeOnly   = "15:04:05"
- location is optional
 - If the name is "" or "UTC", the timezone is set to "UTC". Otherwise, the name is taken to be a location name corresponding to a file in the IANA Time Zone database, such as "America/New_York"
- Lambda
 
 - simple expression: (x, y) ⇒ x+y
 
Block Statements
The parament support object/array destructuring: (obj) ⇒ obj.field1 + obj.field2 OR ({field1, field2})
(x, y) => {
  let a = x + 1
  return a + y
}  // explicit return is required
the lambda parameter support object/array destructuring:
  // obj is a map/object type variable
  (obj) => obj.field1 + obj.field2
  // OR
  ({field1, field2}) => field1 + field2
FplTable
- new Table(col1,col2,…)
 - Columns
 - Rows
 
FplMetric
- from, to
 - interval
 - dimensions
 - Metrics
 
FplAlert
Tuple: list of Data Types or Object Types
Map: map of Data Types or Object Types
Updated 5 months ago
