airtable-api-0.1.0.1: Requesting and introspecting Tables within an Airtable project.

Safe HaskellNone
LanguageHaskell2010

Airtable.Table

Synopsis

Documentation

newtype RecordID Source #

Airtable's record ID for use in indexing records

Constructors

RecordID Text 

class IsRecord a where Source #

A convenience typeclass for selecting records using RecordID-like keys.

Minimal complete definition

toRec

Methods

toRec :: a -> RecordID Source #

data Table a Source #

Airtable's table type

Constructors

Table 

Instances

Show a => Show (Table a) Source # 

Methods

showsPrec :: Int -> Table a -> ShowS #

show :: Table a -> String #

showList :: [Table a] -> ShowS #

Monoid (Table a) Source # 

Methods

mempty :: Table a #

mappend :: Table a -> Table a -> Table a #

mconcat :: [Table a] -> Table a #

FromJSON a => FromJSON (Table a) Source # 

type TableName = String Source #

Synonym used in querying tables from the API.

toList :: Table a -> [(RecordID, a)] Source #

Convert a Table to a list of key-record pairs.

exists :: IsRecord r => Table a -> r -> Bool Source #

Check if a record exists at the given key in a table.

select :: (HasCallStack, IsRecord r, Show a) => Table a -> r -> a Source #

Unsafely lookup a record using its RecordID.

selectMaybe :: (IsRecord r, Show a) => Table a -> r -> Maybe a Source #

Safely lookup a record using its RecordID.

selectAll :: Table a -> [a] Source #

Read all records.

selectAllKeys :: Table a -> [RecordID] Source #

Read all RecordID's.

selectWhere :: Table a -> (RecordID -> a -> Bool) -> [a] Source #

Select all records satisfying a condition.

selectKeyWhere :: Table a -> (RecordID -> a -> Bool) -> [RecordID] Source #

Select all RecordID's satisfying a condition.

deleteWhere :: Table a -> (RecordID -> a -> Bool) -> Table a Source #

Delete all Records satisfying a condition.