SkySpark by SkyFoundry

ext core

Funcs

abs

Return absolute value of a number, if null return null

add

Add item to the end of a list and return a new list.

addAll

Add all the items to the end of a list and return a new list.

addCol

Add a column to a grid by mapping each row to a new cell value.

addColMeta

Return a new grid with additional column meta-data.

addMeta

Add grid level meta-data tags.

addRow

Add an additional Dict row to the end of a grid.

addRows

Add an list of rows to the end of a grid.

all

Return if all the items in a list, dict, or grid match the given test function.

any

Return if any the items in a list, dict, or grid match the given test function.

as

Set the unit of a number.

avg

Fold multiple values into their standard average or arithmetic mean.

capitalize

Return this string with the first character converted to uppercase.

chart

Set the grid visualization view to chart.

checkSyntax

Given an axon expression, validate the syntax.

col

Get a column by its name.

colNames

Get the column names a list of strings.

colToList

Get a column as a list of the cell values ordered by row.

cols

Get the columns from a grid as a list.

colsToLocale

Map each col display string to its localized tag name if the col does not already have a display string.

commit

Commit a diff or list of diffs to the folio database.

concat

Concatenate a list of items into a string.

contains

Return if val contains x

context

Get the current context as a Dict with the following tags

coord

Construct a Coord from two Numbers in decimal degrees

coordDist

Given a two Coords, compute the great-circle distance between them in meters using the haversine forumula.

coordLat

Latitude of a Coord as a Number

coordLng

Longitude of a Coord as a Number

count

Fold multiple values into their total count Return zero if no values.

curFunc

Get the current top-level function's tags.

date

If val is a DateTime: get date portion of the timestamp.

dateTime

Construct a DateTime from a date, time, and timezone name.

day

Get day of month as integer between 1 to 31 from date or datetime.

debugType

Return a string of the given value's type.

decapitalize

Return this string with the first character converted to lowercase.

diff

Construct a modification "diff" used by commit.

dis

Get display string for dict or the given tag.

dst

Given a DateTime in a specific timezone, return true if the time is in daylight savings time or false if standard time.

each

Iterate the items of a collection

eachDay

Iterate the days for where dates may be any object converted into a date range by toDateSpan.

eachMonth

Iterate the months for where dates may be any object converted into a date range by toDateSpan.

eachWhile

Iterate the items of a collection until the given function returns non-null, then break the iteration and return the resulting object.

echo

Write the string represenation of x to standard out.

end

End value of a DateSpan, DateTimeSpan, or a range.

endsWith

Return if Str ends with the specified Str.

eval

Evaluate the given expression formatted as a string.

exts

List the extensions available for the system.

fandoc

Construct view which renders text formatted as fandoc

filterToFunc

Convert a filter expression to a function which may be used with findAll or find.

find

Find the first matching item in a list or grid by applying the given filter function.

findAll

Find all the items in a list, dict, or grid by applying the given filter function.

first

Get the first item from an ordered collection or return null if the collection is empty

fold

Fold a list into a single value using a folding function with the signature of (val, acc) where val is the items being folded, and acc is an accumulator used to maintain state between interations.

foldCol

Fold the values of the given column into a single value using a folding function using same semantics as fold.

foldCols

Fold a set of columns in each row into a new folded column and return a new grid.

foldEnd

The fold end marker value TODO: this API is subject to change

foldStart

The fold start marker value TODO: this API is subject to change

folioCompact

Asynchronously kick off a database compaction operation for current project.

folioEmptyTrash

Delete all the records marked with trash tag.

folioRestore

Restore snapshot identified by given timestamp Requires super user permission.

folioSetMode

Set folio database mode: "ro", "rw", "disabled" Requires super user permission.

folioSnapshot

Asynchronously kick off a new snapshot for current project.

folioSnapshotDelete

Delete a snapshot file by its timestamp.

folioSnapshots

List all the snapshots for the current project

format

Format an object using the current locale and specified format pattern.

fromJavaMillis

Given Number of milliseconds since Unix epoch of 1-Jan-1970 UTC, return a DateTime in given timezone.

func

Find a top-level function by name and return its tags.

funcs

Find all the top-levels functions in the current project which match the given filter.

get

Get an item from a collection

getSafe

Get an item from a str, list, or grid safely when an index is out of bounds

gridColKinds

Given a grid return the types used in each column as a grid with the following

gridColsToDict

Convert a grid into a dict of name/val pairs which are derived from each column using the given functions.

gridFormats

Return grid formats installed.

gridRowsToDict

Convert a grid into a dict of name/val pairs which are derived from each row using the given functions.

has

If val is a Grid return if it has the given column name.

heading

Construct heading view

hour

Get hour of day as integer between 0 to 23 from time or datetime

hoursInDay

Given a DateTime in a specific timezone, return the number of hours in the day.

index

Return the first match of x in val searching forward, starting at the specified offset index.

indexr

Return the last match of x in val searching backward, starting at the specified offset index.

insert

Insert an item into a list at the given index and return a new list.

insertAll

Insert a list of items at the given index and return a new list.

invoke

Invoke an action on the given rec (any value supported by toRec).

isAlpha

Is number an ASCII alpha char: isUpper||isLower

isAlphaNum

Is number an ASCII alpha-numeric char: isAlpha||isDigit

isBool

Return if an object is a boolean type

isDate

Return if an object is a Date type

isDateTime

Return if an object is a DateTime type

isDict

Return if an object is a dict type

isDigit

Is number a digit in the specified radix.

isEmpty

Return if a collection is empty: str, list, dict, or grid

isEven

Return if an integer is an even number.

isFunc

Return if an object is a function type

isGrid

Return if an object is a grid type

isKeyword

Return if given string is an Axon keyword

isList

Return if an object is a list type

isLower

Is number an ASCII lowercase alphabetic char: a-z

isMetric

Given an optional value return true if the SI metric system should be used or false if the United States customary unit system should be used.

isNaN

Return if val is the Number representation of not-a-number

isNumber

Return if an object is a number type

isOdd

Return if an integer is an odd number.

isRef

Return if an object is a ref type

isSpace

Is number is whitespace char: space \t \n \r \f

isStr

Return if an object is a str type

isTagName

Return if the given string is legal tag name - see Etc.isTagName

isTime

Return if an object is a Time type

isUpper

Is number an ASCII uppercase alphabetic char: A-Z

isUri

Return if an object is a Uri type

isWeekday

Does the given Date or DateTime fall on Mon, Tue, Wed, Thu, or Fri

isWeekend

Does the given Date or DateTime fall on Sat or Sun

join

Join two grids by column name.

joinAll

Join a list of grids into a single grid.

keepCols

Return a new grid with keeps the given columns, but removes all the others.

last

Get the last item from an ordered collection or return null if the collection is empty

lastMonth

DateSpan for month previous to this month 1..28-31

lastWeek

DateSpan for week previous to this week sun..sat (uses locale start of week)

lastYear

DateSpan for year previous to this year Jan-1..Dec-31

log

Submit a log record to the logging subsystem

logDebug

Log at the "debug" level - see log.

logErr

Log at the "err" level - see log.

logInfo

Log at the "info" level - see log.

logRead

Read the log file for the given dates range and optional filter.

logWarn

Log at the "warn" level - see log.

lower

Convert a char number or str to lower case

map

Map list, dict, or grid by applying the given mapping function.

marker

Get the marker value singleton Marker.val

max

Compare two numbers and return the larger one.

merge

Merge two Dicts together and return a new Dict.

meta

Get the meta-data from a grid or col as a dict.

min

Compare two numbers and return the smaller one.

minute

Get minutes of the time as integer between 0 to 59 from time or datetime

missing

If val is a Grid return if it does not have given column name.

month

Get month as integer between 1 to 12 from date or datetime

moveTo

Find the given item in a list, and move it to the given index.

na

Get NA not-available singleton NA.val

name

If val is a Col, get the column name.

names

Get the list of names used by a given dict

nan

Return the Number representation of not-a-number

navChildren

Return a grid of the given base records navigation direct children.

navCommonAncestor

Given a navigation tree name and list of records (anything supported by toRecList), return the common ancestor base record that they all share.

navFilter

Return a grid used to represent a navigation filter under one or more base recs.

navLevels

Return a grid to populate a navigation multi-pane dialog.

navTrees

List the navigation trees available for the current project.

negInf

Return the Number representation negative infinity

now

Return current DateTime according to context's time zone

nowTicks

Return current time as nanosecond ticks since 1 Jan 2000 UTC.

numDaysInMonth

Get the number of days in a given month.

occurred

Return if a timestamp is contained within a Date range.

padl

Pad string to the left.

padr

Pad string to the right.

params

Given a function name reflect its parameters as rows with the following columns

parseBool

Parse a Str into a Bool, legal formats are "true" or "false.

parseDate

Parse a Str into a Date.

parseDateTime

Parse a Str into a DateTime.

parseFilter

Parse a string into a Filter expr which may be used with the read or readAll function.

parseFloat

Parse a Str into a Float.

parseInt

Parse a Str into a integer number using the specified radix.

parseNumber

Parse a Str into a number with an option unit.

parseRef

Parse a Str into a Ref.

parseTime

Parse a Str into a Time.

parseUnit

Parse a Str into a standardized unit name.

parseUri

Parse a string into a Uri instance.

passwordGenSalt

Generate a new, unique random string to use for the userSalt tag.

passwordHmac

Generate SHA-1 HMAC which is "user:salt".hmac(pass).

passwordSet

Store a password key/val pair into current project's password manager.

pastMonth

DateSpan for last 30days today-30days..today

pastWeek

DateSpan for last 7 days as today-7days..today

pastYear

DateSpan for this past today-365days..today

posInf

Return the Number representation positive infinity

reFind

Find the first match of regular expression in s or return null if no matches.

reGroups

Return a list of the substrings captured by matching the given regular operation against s.

reMatches

Return if regular expression matches entire region of s.

read

Read from database first record which matches filter.

readAll

Reall all records from the database which match filter.

readAllTagNames

Return the intersection of all tag names used by all the records matching the given filter.

readAllTagVals

Return the range of all the values mapped to a given tag name used by all the records matching the given filter.

readById

Read a record from database by id.

readByIds

Read a list of record ids into a grid.

readByName

Read a record from database by name.

readCount

Return the number of records which match the given filter expression.

readLink

Read a record Dict by its id for hyperlinking in a UI.

readProjStatus

Read status and meta-data information for given project, or if name is null then read for current project.

refGen

Generate a new unique Ref identifier

remove

Remove an item from a collection and return a new collection.

removeCol

Return a new grid with the given column removed.

removeCols

Return a new grid with all the given columns removed.

removeMarker

Get the remove value singleton Remove.val

renameCol

Return a new grid with the given column renamed.

renameId

Convenience for renameIds with one id pair.

renameIds

Rename every occurance of a given set of ids where the keys are the from id and the vals are the to id.

reorderCols

Return a new grid with the columns reordered.

replace

String replace of all occurrences of from with to.

second

Get seconds of the time as integer between 0 to 59 from time or datetime

set

Set a collection item and return a new collection.

size

Return number of items in str, list, or grid

sort

Sort a list or grid.

sortr

Reverse sort a list or grid.

split

Split a string by the given separator and trim whitespace.

spread

Fold multiple values to compute the difference between the max and min value (the range b/w min and max).

start

Start value of a DateSpan, DateTimeSpan or a range.

startsWith

Return if Str starts with the specified Str.

sum

Fold multiple values into their numeric sum.

swizzleRefs

Given a grid of records, assign new ids and swizzle all internal ref tags.

table

Set the grid visualization view to table.

tags

Find all the tags in the current project which match the given filter.

thisMonth

DateSpan for this month as 1st..28-31

thisWeek

DateSpan for this week as sun..sat (uses locale start of week)

thisYear

DateSpan for this year Jan-1..Dec-31

time

If val is a DateTime: get time portion of the timestamp.

times

Call the specified function the given number of times passing the counter.

to

Convert a number to the given unit.

toAxonCode

Convert a scalar, list, or dict value to its Axon code representation

toChar

Convert a unicode char number into a single char string

toDateSpan

Convert the following objects into a DateSpan

toDateTimeSpan

Convert the following objects into a DateTimeSpan

toGrid

Given an arbitrary object, translate it to a Grid via Etc.toGrid

toHex

Convert a number to a hexadecimal string

toJavaMillis

Given a DateTime return Number of milliseconds since Unix epoch of 1-Jan-1970 UTC Also see fromJavaMillis.

toLocale

Get the localized string for the given tag name or qualified name.

toRec

Given any of the following, return a Dict

toRecId

Given any of the following, return a Ref

toRecIdList

Given any of the following, return a Ref[]

toRecList

Given any of the following, return a Dict[] of records

toStr

Convert an obj to its string representation

toTagName

Given arbitrary string, convert to a safe tag name - see Etc.toTagName

toTimeZone

Convert a DateTime to another timezone

today

Return today's Date according to context's time zone

trap

If the given value is a dict, then get a value by name, or throw UnknownNameErr if name not mapped.

trim

Trim whitespace from the beginning and end of the string.

trimEnd

Trim whitespace only from the end of the string.

trimStart

Trim whitespace only from the beginning of the string.

tz

Get timezone as city name string in tzinfo database from datetime

tzdb

Return the installed timezone database as Grid with following columns

unique

Return the unique items in a collection.

unit

Given a number return its unit string or null.

unitdb

Return the installed unit database as Grid with following columns

unitsEq

Return if the two numbers have the same unit.

upper

Convert a char number or str to upper case

uriBasename

Get the basename (last name in path without extension) of a Uri as a string.

uriDecode

Parse an ASCII percent encoded string into a Uri according to RFC 3986.

uriEncode

Return the percent encoded string for this Uri according to RFC 3986.

uriExt

Get the URI extension of a Uri as a string or null.

uriHost

Get the host Uri as a string or null

uriIsDir

Return if the URI path ends in a slash.

uriName

Get the name Str of a Uri (last item in path).

uriPath

Get the path segments of a Uri as a list of Strs.

uriPathStr

Get the path a Uri as a string.

uriPort

Get the port of a Uri as a Number or null

uriScheme

Get the scheme of a Uri as a string or null

vals

Get the list of values used by a given dict

watchAdd

Add a grid of recs to an existing watch.

watchClose

Close an open watch by id.

watchOpen

Open a new watch on a grid of records.

watchPoll

Poll an open watch and return all the records which have changed since the last poll.

watchRemove

Remove a grid of recs from an existing watch.

weekday

Get weekday as integer from 0 to 6 of Date or DateTime, where 0 indicates Sunday and 6 indicates Saturday

year

Get year as integer such as 2010 from date or datetime

yesterday

Return yesterday's Date according to context's time zone

Tags

actionAccessFilter

String tag applied to a user record to control which actions a user can access.

actions

User action commands encoded as a Zinc grid with a dis and expr column.

appAccess

Tag applied to a user account to restrict the set of accessible apps.

auditAction

Log each time an action is invoked.

auditCommit

Log each time a diff is committed to the folio database.

auditLogin

Log each time a user logs into the REST HTTP API.

auditMeta

Marker tag for the audit meta singleton record.

bin

Applied to a nested rec to define a binary file tag.

chartGroup

Group name used to overlay charts together.

chartType

Enumerated chart type such as "line" or "bar".

color

Color encoded as "#RRGGBB" or "#RGB"

created

Timestamp when record was created.

date

Date when an event or spark occurred.

dis

Display name.

disMacro

Display name using macro syntax.

disableOverridableChecks

Applied to projMeta to disables function overridable checking.

disabled

Used to disable the functionality of a given record.

doc

Documentation for a record stored as Fandoc text

email

Email address for a user.

err

Indicates an error condition, dis should contain display message.

errTrace

Indicates an exception stack trace

expr

Axon expression string

ext

Enable an extension for the project.

file

MIME typed file

firstName

Given or personal name of a user account.

fresco

Used to store a Fantom source file for fresco JavaScript.

func

Function record: name define the qualified name of the function, src stores source code.

funcOn

Filter which specifies target (first parameter) of the function.

help

Documentation designed for end user consumption stored as Fandoc text.

id

Universally unique identifier - see docSkySpark.

js

JavaScript source code

kind

Value type of a tag definition, see docSkySpark for list of kind names.

lastName

Family or surname of a user account.

limit

Defines a cap on the number of items to return

maint

Summary of project's current maintenance operation.

mime

MIME type string for bin tag.

mod

Last modified time of record - see docSkySpark.

more

Indicates more data is available, but limit was reached

name

Programatic name of record; must be valid tag identifier and unique within project.

navMeta

Marked the singleton record used to configure navigation metadata.

navName

Navigation name commonly used with disMacro to create compound dis strings.

overridable

Applied to an ext function to enable override by project record functions.

params

Parameter signature of a function.

progress

Percent complete 0% to 100% of a background operation.

progressMsg

Additional message information about background operation progress.

projDir

Directory Uri of project on file system

projMeta

Project definition and meta-data.

projName

Project name.

projStatus

Project status: rw, ro: lib, ro: maint, ro: manual, disabled

recCount

Number of records

src

Source code stored in plain text

tag

Tag definition

transient

Marks a record as transient so it is never persisted

trash

Marks a record as deleted for cleanup

ts

Timestamp of when an event occurred.

tz

Timezone as city name from Olson tz database - see TimeZone.

unit

Unit of measurement for record using name from Fantom/oBIX database.

uri

URI address, often used with connectors

user

User account - see docSkySpark

userAdmin

Indicates a user has administrator permissions.

userSalt

Nonce used for password digest.

username

Username used to key a user account.

val

Current primary value of record