Apps     Components     Interfaces     All Files     Source Tree     source: tos.lib.TinyDB.ParsedQuery.nc

Component: ParsedQuery

Required Interfaces

Provided Interfaces

Function Index

Function Descriptions

ParsedQueryIntf.getFieldType

command result_t ParsedQueryIntf.getFieldType (ParsedQuery *pq, uint8_t fieldIdx, uint8_t *type)

Return the type of the specified field index from pq in type. Return FAIL if the index is invalid, or the field is NULL.

Parameters:

pq - The query to get the field type from

fieldIdx - The index of the field whose type is desired

type - (on return) The type of the requested field

Returns: FAIL if the index is valid or the field is NULL

ParsedQueryIntf.typeCheck

command bool ParsedQueryIntf.typeCheck (ParsedQuery *dest, ParsedQuery *select)

Verify that the schema of the destination query matches the schema of the select query. The dest query must create a buffer and have a table of named fields set up. The number, order, and type of these fields must match the fields in the select query.

Parameters:

dest - A ParsedQuery with a Table of named, typed fields

select - A ParsedQuery that will insert into dest