Skip to content

Latest commit

 

History

History
217 lines (166 loc) · 7.14 KB

CHANGELOG.md

File metadata and controls

217 lines (166 loc) · 7.14 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.8.0 (2019-11-26)

Fixed

  • #52 - Merging the FILTER keyword with the label of a function expression
  • #53 - PatternBuilder.minus() method not returning a Pattern when Patterns are provided

Breaking Changes

  • #47 - Add an _ at the beginning of internal methods.
    Affected methods are:
    • Pattern.getPattern() => Pattern._getPattern()
    • TrippleSubject.getSubject() => TrippleSubject._getSubject()
    • Path.getPath() => Path._getPath()
    • OrderCondition.getOrderCondition() => OrderCondition._getOrderCondition()
    • Expression.getExpression() => Expression._getExpression()
    • Projectable.getProjection() => Projectable._getProjection()

0.7.0 (2019-11-05)

Added

  • #4 - Add support for SPARQL expressions
    Example:
    import { SPARQLER } from "sparqler";
    import { PatternBuilder } from "sparqler/patterns";
    
    new SPARQLER()
        .select( (_:PatternBuilder) => ([
            _.var("foo"),
            _.max(_.var("baz")).as( "total" ),
        ]) )
        .where( (_:PatternBuilder) => ([
            // Using the same object methods
            _.bind( _.var("bar").multiply( 0.5 ), "baz" ),
            // Using the builder methods
            _.filter( _.gte( _.var("bar"), 10 ) ),
        ]))
        .groupBy( (_:PatternBuilder) => ([ _.var("foo") ]) )
    ;

Fixed

  • #45 - Not adding all the elements in a single variable values pattern

Breaking Changes

  • #4 - The following methods now accept Expression objects, instead of RAW expression strings:

    • BIND
    • FILTER
    • GROUP BY
    • HAVING
    • ORDER BY


    Example:

    import { SPARQLER } from "sparqler";
    import { PatternBuilder } from "sparqler/patterns";
    
    new SPARQLER()
        .select( "foo", "baz" )
        .where( (_:PatternBuilder) => ([
            // Using the same object methods
            _.bind( _.var("bar").multiply( 0.5 ), "baz" ),
            // Using the builder methods
            _.filter( _.gte( _.var("bar"), 10 ) ),
        ]))
        .groupBy( (_:PatternBuilder) => ([ _.var("foo") ]) )
    ;

0.6.0 (2018-09-20)

Added

  • #33 - Full support for property paths
    Example:
    ( _:PathBuilder ) => _
      .inverse( "ex:path1" ) // ^ex:path1
        .then( "ex:path2" )   // ^ex:path1 / ex:path2
        .onceOrMore()         // (^ex:path1 / ex:path2)+

0.5.0 (2018-08-22)

Added

  • #27 - Add method to debug query
    sparqler
        /* ... */
        .debug( ( query, container ) => {
            // `query`:  the same query before the debug method
            // `container`: the data container of the query (the actual query tokens, IRI options, etc)
        } );
  • #30 - Support ASK queries
    Example:
    sparqler
        .ask()
        .where( _ => [
            /* Patterns */
        ] );

Breaking Changes

  • Refactor internal code (this does not affect SPARQLer interfaces):
    • Create tokens that replicate the grammatical tree
    • Refactor query creation using the new tokens models
    • Refactor patterns using the new model

0.4.0 (2018-03-23)

Added

  • #21 - Add support for modifiers in the select statement
    • Add DISTINCT support over selectDistinct() and selectAllDistinct()
    • Add REDUCED support over selectReduced() and selectAllReduced()

0.3.1 (2018-01-29)

Fixed

  • #19 - When adding a prefix with the same name, the last one will be preserved
  • #18 - Workaround for Stardog's SPARQL query parsing with the BASE definition

0.3.0 (2017-12-29)

Added

  • #13 - Support for VALUES as clause
    Example:
    sparqler
        .select( "book", "title" )
        .where( _ => _.var( "book" ).has( "title", _.var( "title" ) ) )
        .values( [ "book", "title" ], _ => [
            [ _.resource( "http://example.com/guides/value-clause/" ) ],
            [ "Value Clause Guide" ]
        ] );
  • #10 - Support for sub-selects
    Example:
    // Comments of the first recommended book
    sparqler
        .select( "book", "comments" )
        .where( _ => [
            _.select( "book" )
                .where( [
                _.var( "book" ).has( "recomendation-points", _.var( "points" )  )
                ] )
                .orderBy( "DESC( ?points )" )
                .limit( 1 ),
            _.var( "book" ).has( "comment", _.var( "comments" ) )
        ] );
  • #9 - Add base support for RAW property paths

Fixed

  • #14 - Validate variable names

0.2.0 (2017-06-01)

Added

  • #7 - Add patterns:
    • SERVICE - Full support
    • SERVICE SILENT - Full support
    • BIND - Basic support with RAW expression string
    • FILTER - Basic support with RAW expression strings

0.1.1 (2017-03-25)

Added

0.1.0 (2016-12-22)

  • First release