L8QL is a pure-Go, reflection-based SQL-like query language for filtering Go data structures in memory. No database, no ORM, just struct filtering via reflection. It provides a single, common API to query graph model data of any Go struct at runtime.
Queries compile in two stages.
L8Query protobuf message. Validates syntax only.IResources instance. Resolves field names against the introspected type schema. Produces an executable Query.select <columns> from <type>
[where <conditions>]
[sort-by <column>] [ascending|descending]
[limit <number>] [page <number>]
[match-case]
[mapreduce]
[group-by <columns>] [having <conditions>]
=name='J*')!=>, >=, <, <=in, not inand, or()Aggregate functions: count(*), count(field), sum(field), avg(field), min(field), max(field). Combine with group-by and having for grouped analytics.
Query nested objects, arrays, and maps seamlessly.
select name from Employee where addresses.country = 'USA'
J* matches John, Jane)match-casesort-by and ascending/descendinglimit and pagequery.Match(obj)query.Filter(list, onlySelected)query.Aggregate(list)query.Hash()query.Properties()