Methods
The following methods are available for all adapters.
list
return all records from a given layoutfind
perform a FileMaker findget
return a single record by recordIDcreate
return a new recordupdate
modify a single record by recordIDdelete
delete a single record by recordID
Helper Functions
This package also includes some helper methods to make working with Data API responses a little easier:
findOne
return the first record from a find instead of an array. This method will error unless exactly 1 record is found.findFirst
return the first record from a find instead of an array, but will not error if multiple records are found.findAll
return all found records from a find, automatically handling pagination. Use caution with large datasets!listAll
return all records from a given layout, automatically handling pagination. Use caution with large datasets!
Adapter-Specific Functions
The first-party FetchAdapter
and OttoAdatper
both share the following additional methods from the BaseFetchAdapter
:
executeScript
execute a FileMaker script directlylayoutMetadata
return metadata for a given layoutlayouts
return a list of all layouts in the database (top-level layout key ignored)scripts
return a list of all scripts in the database (top-level script key ignored)globals
set global fields for the current session (top-level globals key ignored)
If you have your own proxy, you can write your own Custom Adapter that extends the BaseFetchAdapter to also implement these methods.
Fetch Adapter
disconnect
forcibly logout of your FileMaker session
Otto Adapter
No additional methods