Skip to main content

cartodb@0.4.12

addRow(table, rowData)
sql(sqlQuery)

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)");