Skip to main content
FiQueLa provides several ways to open a file and obtain a query object. All approaches ultimately produce the same chainable query interface.
Use Stream\Provider::fromFile() to open a file. The format is detected from the file extension automatically, or you can pass an explicit Format enum.

FileQuery syntax

The FileQuery string is a compact notation used in fromFileQuery() and inside FQL FROM, JOIN, and INTO clauses.
Examples:

Default parameter values

Default values are omitted from the serialized output. For example, csv(data.csv) is equivalent to csv(data.csv, "utf-8", ",").
CSV bom is opt-in (0 or 1). When set to 1, the writer emits a UTF-8 BOM. The reader auto-detects and skips UTF-8, UTF-16 LE/BE, and UTF-32 LE/BE BOMs regardless of the bom parameter, and transcodes non-UTF-8 input via a stream filter.

Querying from a string

You can also open an in-memory string rather than a file using Stream\Provider::fromString().
All opening methods return the same Interface\Query object, so you can chain the same fluent methods regardless of how you opened the file.