Download the PHP package gosuperscript/axiom-lookup without Composer

On this page you can find all versions of the php package gosuperscript/axiom-lookup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package axiom-lookup

Axiom Lookup

A high-performance PHP library for querying CSV/TSV files with streaming, dynamic filtering, aggregate functions, and range-based banding — packaged as a first-class Axiom source.

Features

Installation

Quick Start

A LookupSource is pure, serialisable data — the file path, the filters, the columns, the aggregate. The filesystem the read needs is injected into a LookupExtension, which you compose onto the dialect; the source itself carries no live collaborator. Compile the source into a Program, then invoke it.

Aggregates

LookupSource::$aggregate is one of the names AggregateKind defines, and that enum is the only place the list lives. Ask it rather than restating the list:

requiresColumn() is the difference between the aggregates that read whole records and those that read one column's values. first, last, count and all count matching records or extract the requested columns from them, so they need no aggregateColumn. sum, avg, min and max need one — there is no sum of a whole record — and refuse without it:

So a caller validating a lookup before running it, or offering a column picker only where a column means something, reads both facts from the kind instead of keeping its own copy in step with this package. Given an aggregate state, $aggregate->kind() gets back to the same answers.

Using Different Storage Backends

The library uses Flysystem for filesystem abstraction, enabling you to read CSV files from various storage backends. The filesystem operator is passed to the LookupExtension, so you choose the right adapter once when you compose the dialect — every LookupSource compiled with it reads through that filesystem.

Local Filesystem

Amazon S3

Reusing a Program with Different Inputs

A filter value is a Source, so it can be a SymbolSource supplied at call time. Declare the symbol's type on the Expression; the compiled Program then admits it at the boundary and you invoke it with per-call bindings:

Indexed reads (the reader seam)

By default every lookup streams its whole file. A host that keeps an indexed copy of a lookup file — a database artifact, for instance — can answer equality lookups from it instead by injecting a LookupSourceReader:

The reader's contract: yield a superset of the records the filter pipeline would have matched in a full scan, in the file's original row order. Every yielded record still passes the full filter pipeline, so a reader may only change where the file is read — never a lookup's answer. A reader may fail eagerly or lazily (mid-iteration); both surface as the lookup's failure Result.

LookupSource accepts an optional index naming the column an indexed reader may seek on — purely an access-path hint, persisted with the source; declaring it never changes results. Each invocation hands the reader its probes: the resolved value of every == filter on a String-typed column, keyed by column. Skipping a probe is always safe; the filter pipeline still applies every filter.

Probes are byte-equality seeks. They are only sound where the dialect's String == String is raw byte equality (the core rule); a host whose dialect overloads that comparison must not serve probes from a byte-built index.

For observability the evaluation annotates scan with the strategy that answered (full-stream, or the indexed reader's own label), at most once, in a stable position before label.

Typed filters and operators

Filters are serialisable descriptions. During compilation, LookupExtension compiles each filter value and binds its operator from the expression's composed dialect. The resulting operation is reused for every row; filters do not contain a resolver and do not reimplement comparisons at runtime.

CSV cells are strings by default. Add a schema entry when a filter should read a cell as another Axiom type. For example, numeric ordering needs a numeric column declaration:

RangeFilter uses the same mechanism for its [minimum, maximum) test, so both bound columns should declare an orderable type:

Extension-owned operators work without lookup-specific integration. If an extension in the dialect owns equals-ignore-case for String × String → Boolean, a ValueFilter(..., 'equals-ignore-case') binds that exact rule. Unknown operators, incompatible operands, and operators that do not return Boolean are compile errors. A cell that cannot be coerced to its declared type is a runtime boundary error rather than a silent string comparison.

An all lookup is a total collection: no matching rows produce [], not absence. This makes a nested collection lookup usable as the right side of in after one explicit element-type bridge:

Other Storage Options

Flysystem supports many adapters including:

See the Flysystem documentation for more options.

Requirements

Testing

Benchmarking

Performance Characteristics

License

Proprietary

Credits

Developed by GoSuperscript


All versions of axiom-lookup with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
gosuperscript/axiom Version ^0.6.0
gosuperscript/monads Version ^1.0.0
league/csv Version ^9.27.0
league/flysystem Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gosuperscript/axiom-lookup contains the following files

Loading the files please wait ...