flytable-queries: Flytable database queries

flytable-queriesR Documentation

Flytable database queries

Description

flytable_query performs a SQL query against a flytable database. You can omit the base argument unless you have tables of the same name in different bases.

Usage

flytable_list_rows(
  table,
  base = NULL,
  view_name = NULL,
  order_by = NULL,
  desc = FALSE,
  start = 0L,
  limit = Inf,
  python = FALSE,
  chunksize = NULL
)

flytable_query(
  sql,
  limit = 100000L,
  base = NULL,
  python = FALSE,
  convert = TRUE
)

Arguments

table

The name of a table inside your database

base

Character vector naming a seatable base (recommended) or a Base object returned by flytable_base (expert use).

view_name

An optional view which may limit the rows/columns displayed.

order_by

Optional name of columns to order results

desc

Whether to use descending order (default FALSE => ascending order)

start

Optional starting row

limit

An optional limit, which only applies if you do not specify a limit directly in the sql query. By default seatable limits SQL queries to 100 rows. We increase the limit to 100000 rows by default.

python

Whether to return a Python pandas DataFrame. The default of FALSE returns an R data.frame

chunksize

Optional The maximum number of rows to request in one web request. For advanced use only as the default value of NULL will fetch as many as possible.

sql

A SQL query string. See examples and seatable docs.

convert

Expert use only: Whether or not to allow the Python seatable module to process raw output from the database. This is is principally for debugging purposes. NB this imposes a requirement of seatable_api >=2.4.0.

Details

Flytable uses programmatic access to the seatable API.

Value

An R data.frame or Pandas DataFrame depending on the value of the python argument.

a data.frame of results. There should be 0 rows if no rows matched query.

See Also

tabify_coords to help with copy-pasting coordinates to seatable.

Other flytable: flytable_list_selected(), flytable_login(), flytable_update_rows()

Examples


flytable_list_rows(table = "testfruit")


flytable_query("SELECT person, fruit_name FROM testfruit WHERE person!='Bob'")

## Not run: 
flytable_query(paste("SELECT root_id, supervoxel_id FROM info limit 5"))

## End(Not run)

natverse/fafbseg documentation built on Nov. 11, 2024, 9:50 p.m.