News for hackers. Stuff that matters.
Re:SpahQL - A query language for Javascript objects by DonnyV on Monday May 21, 2012 @08:55AM (#4002594)
linq.js has been doing this for years now. Its a mature library, flexible and light. I use it for every web project, wouldn't know what to do with out it. http://linqjs.codeplex.com/ Examples: http://neue.cc/reference.htm

  Features
  --------------------------------------  
  implement all .NET 4.0 methods and many extra methods
  (inspiration from Rx, Achiral, Haskell, Ruby, etc...)
  complete lazy evaluation
  full IntelliSense support for VisualStudio
  two versions - linq.js and jquery.linq.js (jQuery plugin)
  support Windows Script Host
  binding for Reactive Extensions for JavaScript(RxJS) and   
  IntelliSense Generator -> see documentation
  NuGet install support(linq.js, linq.js-jQuery, linq.js-Bindings)

  90 Methods
  ----------------------------------------
  Aggregate, All, Alternate, Any, Average, BufferWithCount,   
  CascadeBreadthFirst, CascadeDepthFirst, Catch, Choice,  
  Concat,Contains, Count, Cycle, DefaultIfEmpty, Distinct, Do,   
  ElementAt, ElementAtOrDefault, Empty, Except, Finally, First,  
  FirstOrDefault, Flatten, ForEach, Force, From, Generate,  
  GetEnumerator, GroupBy, GroupJoin, IndexOf, Insert, Intersect, 
  Join, Last, LastIndexOf,
  LastOrDefault, Let, Matches, Max, MaxBy, MemoizeAll, Min,  
  MinBy, OfType, OrderBy, OrderByDescending, Pairwise,  
  PartitionBy, Range, RangeDown, RangeTo, Repeat,  
  RepeatWithFinalize, Return, Reverse, Scan, Select, SelectMany,  
  SequenceEqual, Share, Shuffle,
  Single, SingleOrDefault, Skip, SkipWhile, Sum, Take,  
  TakeExceptLast, TakeFromLast, TakeWhile, ThenBy,  
  ThenByDescending, ToArray,
  ToDictionary, ToInfinity,ToJSON, ToLookup, ToNegativeInfinity,  
  ToObject, ToString, Trace, Unfold, Union, Where, Write,  
  WriteLine, Zip
Re:SpahQL - A query language for Javascript objects by angryamoeba on Monday May 21, 2012 @09:43AM (#4002763)
Good utility, but I had a few specific itches to scratch with SpahQL:

* Declarative syntax for selections, such that selection queries may be handed between implementations in other languages

* Imperative syntax for updates, such that updates may be idiomatic to the language in which the spahql library has been ported (linq meets this criteria)

In essence all SpahQL is, is a shorthand syntax for generating traversal and descent functions, which output a proxy object for reading to and writing from the selected nodes.