rbuckton/iterable-query

Version 1.0.0?

DanielSWolf opened this issue · 6 comments

Hi! I've been using QueryJS for some weeks now, and I really like how you combine the LINQ philosophy with JavaScript conventions and iterables.

QueryJS looks rather mature to me. Is there a reason why its version is still 0.1.1? According to SemVer, I'd expect it to be somewhere > 1.0.0. I'd like to convince more colleagues to give it a try, but the version number isn't too reassuring.

I've been planning on an overhaul of the library for some time to include support for functional style operations as well as queries over AsyncIterable, in addition to a documentation overhaul.

I will likely publish it as a 1.0.0-dev release in the next few days.

Support for AsyncIterable would be great!

This has been published to npm as 1.0.0-pre.0 and is available now.

There are a number of breaking changes in directory structure (i.e. "out" was renamed to "dist") if you currently have require calls that deeply reference a submodule of the package.

Also as an fyi, I just published a related project: https://www.npmjs.com/package/iterable-query-linq. It allows you to use a LINQ-like FLWOR syntax using tagged template expressions:

import { linq } from "iterable-query-linq";
 
const q = linq`
    from user in ${users}
    where user.name === "Alice"
    select user
`;

console.log(q.toArray());

Also supports async iterables:

const q = linq.async`
  from await x in ${someAsyncSource}
  where x.value > 0
  select x
  `;

The project is a very early alpha and I haven't thoroughly documented it yet, but it uses mostly the same syntax as C#'s LINQ syntax with a minimal JavaScript expression syntax:

// from clause
from x in y

// join clause
join a in b on a equals x 

// join..into clause
join a in b on a equals x into c

// let clause
let a = x

// where clause
where x > 0 && x % 2 === 1

// group clause
group x by y

// group..into clause
group x by y in to z

// orderby clause
orderby x ascending

// select clause
select x + 1

// select..into clause
select x into y

That's a nice idea! I like how tagged templates allow for embedded DSLs in JavaScript.

Personally, though, I prefer the plain extension method-based LINQ syntax in C#. So I'll definitely stick with your existing library.

There have been two pre-releases of version 1.0.0, but no actual release. What are your plans regarding version 1.0.0?