Skip to main content

cartodb@0.4.15

addRow(table, rowData)
sql(sqlQuery)

This adaptor exports the following from common:

dataPath()
dataValue()
each()
field()
fields()
fn()
fnIf()
lastReferenceValue()
merge()
sourceValue()

Functions

addRow

addRow(table, rowData) ⇒ Operation

Add rows to a table

ParamTypeDescription
tableStringTable name
rowDataobjectdata to add in the row

Example: Add rows to a table

addRow('users', { name: 'Alice', age: 25, city: 'New York' })

sql

sql(sqlQuery) ⇒ Operation

Execute an SQL statement

ParamTypeDescription
sqlQueryobjectPayload data for the message

Example: A basic radius search query

sql("SELECT * FROM table WHERE ST_DWithin(geom,ST_Point(-73,40),1000)");