lib

lib:axon

Axon core library

meta

tags

admin

Requires admin permission

disableOverridableChecks

Disables function overridable checking

err

Indicates an error condition, dis should contain display message

errTrace

Exception stack trace

expr

Axon expression string

foldOn

Registers a function as folding a given value type

func

Axon function

name

Name key

overridable

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

src

Source code

su

Requires superuser permission

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

addCols

Add grid b as a new set of columns to grid a

addMeta

Return new grid with additional 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

call

Reflectively call a function with the given arguments

capitalize

Return this string with the first character converted to uppercase

clamp

Clamp the number val between the min and max

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

collect

Collect stream into a in-memory list or grid

cols

Get the columns from a grid as a list

colsToLocale

Localize column display names

compDef

Return component definition

concat

Concatenate a list of items into a string

conjuncts

List conjunct definitions in the context namespace as Def[]

contains

Return if val contains x

coord

Construct a Coord from two Numbers in decimal degrees

coordDist

Compute the great-circle distance between two Coords

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

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

dayOfYear

Given a DateTime or Date, return the day of the year

debugType

Return a string of the given value's type

decapitalize

Return this string with the first character converted to lowercase

def

Lookup a def by its symbol name (Str or Symbol)

defs

List all definitions in the context namespace as Def[]

dis

Get display string for dict or the given tag

dst

Return if a DateTime is in daylight saving time

each

Iterate the items of a collection

eachDay

Iterate the days of a span

eachMonth

Iterate the months of a span

eachWhile

Iterate the items of a collection until the given function returns non-null

echo

Write the str represenation of x to stdout and return x

end

End value of a DateSpan, Span, or a range

endsWith

Return if Str ends with the specified Str

equals

Return if two values are equivalent

eval

Evaluate an Axon string expression

filter

Apply a filter expression to a collection of dicts

filterToFunc

Convert a filter expression to a function which maybe 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

firstOfMonth

Get the first day of given date's month

flatMap

Map each item in a list or grid to zero or more new items as a flattened result

flatten

Flatten a list to a single level

fold

Fold a list or stream into a single value using given folding function

foldCol

Fold the values of the given column into a single value

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

foldStart

The fold start marker value

format

Format an object using the current locale and specified format pattern

fromJavaMillis

Given Number of milliseconds since Unix epoch return a DateTime

func

Find a top-level function by name or by reference 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 grid columns into a dict of name/val pairs

gridRowsToDict

Convert grid rows into a dict of name/val pairs

has

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

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

isAlpha

Is number an ASCII alpha char

isAlphaNum

Is number an ASCII alpha-numeric char

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

isDuration

Return if an object is a number type with a time unit

isEmpty

Return if a collection is empty

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

isHisGrid

Return if an object is a grid that conforms to the history grid shape

isKeyword

Return if given string is an Axon keyword

isLeapYear

Return if a year is a leap year

isList

Return if an object is a list type

isLower

Is number an ASCII lowercase alphabetic char

isMetric

Given an optional value return true if the SI metric system should be used

isNaN

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

isNonNull

Return if an object is not null

isNull

Return if an object is null

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

isSpan

Return if an object is a span

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

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

lastOfMonth

Get the last day of the date's month

lastQuarter

DateSpan for 3 month quarter previous to this quarter

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

libs

List the lib definitions in the context namespace as Def[]

limit

Truncate stream after given limit is reached

localeUse

Evaluate an expression within a specific locale

lower

Convert a char number or str to ASCII 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

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

nowUtc

Return current DateTime in UTC

numDays

Number of whole days in a span

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

parseAst

Parse Axon source code into an abstract syntax tree modeled as a tree of dicts

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 filter string into a Filter instance

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

parseSearch

Parse a search string into a Filter instance

parseSymbol

Parse a Str into a Symbol

parseTime

Parse a Str into a Time

parseUnit

Parse a Str into a standardized unit name

parseUri

Parse a string into a Uri instance

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

reFindAll

Find all matches of the regular expression in s

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

reduce

Reduce a collection to a single value with the given reducer function

refDis

Given a ref return Ref.dis

refGen

Generate a new unique Ref identifier

refProjName

Given an absolute ref, return its project name

relDis

Get a relative display name

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

renameCols

Return a new grid with multiple columns renamed

reorderCols

Return a new grid with the columns reordered

replace

String replace of all occurrences of from with to

rowToList

Get a grid row as a list of cells

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

setColMeta

Return a new grid with column meta-data replaced by given meta dict

setMeta

Return new grid with grid level meta-data replaced by given meta Dict

size

Return number of items in str, list, or grid

skip

Skip the given number of items in a stream

sort

Sort a list or grid

sortDis

Sort a grid by row display name - see Grid.sortDis

Examples

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

start

Start value of a DateSpan, Span or a range

startOfWeek

Return current locale's start of weekday

startsWith

Return if Str starts with the specified Str

stream

Create new stream from given collection

streamCol

Create a new stream for the cell values of the given column

sum

Fold multiple values into their numeric sum

swizzleRefs

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

tags

List tag definitions in the context namespace as Def[]

terms

List term definitions (tags and conjuncts) in the context namespace as Def[]

thisMonth

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

thisQuarter

DateSpan for this 3 month quarter

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

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

Examples

toDateSpan

Convert the following objects into a DateSpan

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

toList

If val is a list return it, otherwise return [val]

toLocale

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

toRadix

Convert a number to its string representation in the given radix (base)

toSpan

Convert the following objects into a Span

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 or Span to another timezone

today

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

transpose

Perform a matrix transpose on the grid

trap

Function for the -> operator

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

unique

Return the unique items in a collection

unit

Given a number return its unit string or null

unitsEq

Return if the two numbers have the same unit

upper

Convert a char number or str to ASCII 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

uriFrag

Return if the fragment identifier portion of the a URI after hash symbol

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

uriPlusSlash

Adding trailing slash to the URI

uriPort

Get the port of a Uri as a Number or null

uriQueryStr

Return if the query portion of the a URI after question mark

uriScheme

Get the scheme of a Uri as a string or null

vals

Get the list of values used by a given dict

weekOfYear

Given a DateTime or Date, return the week number of the year

weekday

Get weekday as integer from 0 to 6 of Date or DateTime

xstr

Construct decoded XStr instance

year

Get year as integer such as 2010 from date or datetime

yesterday

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