-
Notifications
You must be signed in to change notification settings - Fork 25
/
ChangeLog.8
4973 lines (3384 loc) · 157 KB
/
ChangeLog.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2010-12-30 Dave Beckett <[email protected]>
* src/rasqal_expr_strings.c: Count number of Unicode characters
not byte length
(rasqal_unicode_utf8_strlen): Added to count number of UTF-8
encoded characters in a string.
(rasqal_expression_evaluate_strlen): Use above to return strlen
* tests/sparql/check-sparql: Handle vars mentioned in select
expresssions, partially
* src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c: Use
rasqal_expression_evaluate_str_prefix_suffix() to implement
CONTAINS()
* src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c,
src/rasqal_internal.h: Implement SPARQL 1.1 STRSTARTS() and
STRENDS()
(rasqal_literals_sparql11_compatible): Added to check literal
compatibility for matching according to SPARQL 1.1 draft string
matching rules.
(rasqal_expression_evaluate_str_prefix_suffix): Added to implement
prefix and suffix matching if the literals are compatible.
* src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c,
src/rasqal_internal.h:
(rasqal_expression_evaluate_set_case): Added implementing UCASE()
and LCASE() for ASCII
* src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c,
src/rasqal_internal.h:
(rasqal_expression_evaluate_strlen): Added implementing STRLEN()
* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_expr_evaluate.c,
src/rasqal_query_write.c, src/sparql_lexer.l, src/sparql_parser.y:
Added tokens and parsing for 7 more SPARQL 1.1 string functions
rasqal_op gains: RASQAL_EXPR_STRLEN, RASQAL_EXPR_SUBSTR,
RASQAL_EXPR_UCASE, RASQAL_EXPR_LCASE, RASQAL_EXPR_STRSTARTS,
RASQAL_EXPR_STRENDS, RASQAL_EXPR_CONTAINS,
RASQAL_EXPR_ENCODE_FOR_URI Added SPARQL parsing support for above
builtin functions.
(rasqal_expression_write, rasqal_expression_print,
rasqal_expression_is_constant, rasqal_expression_compare,
rasqal_query_write_sparql_expression, sparql_token_print): Add
support (rasqal_expression_evaluate): Add cases to switch with
not-implemented.
(STRLEN, SUBSTR, UCASE, LCASE, STRSTARTS, STRENDS, CONTAINS,
ENCODE_FOR_URI): Added terminal tokens.
(SPARQL grammar token StringExpression): Added token
* src/rasqal_format_rdf.c:
(rasqal_query_results_rdf_init): Only declare raptor_world_ptr for
Raptor V2
* src/rasqal_format_rdf.c:
(rasqal_query_results_rdf_init): For unknown name, set write
format to NULL.
* src/rasqal_expr_evaluate.c: remove unused var s
* src/rasqal_expr_evaluate.c: Remove regex headers
* src/Makefile.am, src/rasqal_expr_datetimes.c,
src/rasqal_expr_evaluate.c, src/rasqal_internal.h: Split date and
time expression evaluations out into rasqal_expr_datetimes.c
* src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c,
src/rasqal_internal.h:
(rasqal_expression_evaluate_langmatches): Added
* src/Makefile.am, src/rasqal_expr_evaluate.c,
src/rasqal_expr_strings.c, src/rasqal_internal.h: Split string
expression evaluations out into rasqal_expr_strings.c
* src/rasqal_expr_evaluate.c: Code style
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate): Report eror failure for executing
aggregate expressions.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate): Remove unused i
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_bnode_constructor): Added and make it
tidy up.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_uri_constructor): Added.
* src/rasqal_expr_evaluate.c: Handle IN and NOT_IN with one
function
(rasqal_expression_evaluate_in_set): Renamed from
rasqal_expression_evaluate_in and invert result for NOT_IN.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_in): Added.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_sameterm): Added.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_datatype): Added
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_lang): Added
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_str): Added
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_coalesce): Added.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_if): Added
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_bound): Added.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_istype): Added for checking term types
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_strlang): Added and may even work now.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_strdt): Copy lang string
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_strdt): Added.
* src/rasqal_literal.c:
docs
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_concat): Added. Preserves literal
datatype.
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_datetime_part): Free literal
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_datetime_part): Added Also make
TIMEZONE() report an error and fail rather than abort()
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_from_unixtime): Added
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_to_unixtime): Added
* src/rasqal_expr_evaluate.c: #ws
* src/rasqal_expr_evaluate.c:
(rasqal_expression_evaluate_now): Added
* src/Makefile.am, src/rasqal_expr.c, src/rasqal_expr_evaluate.c:
Move expression evaluate code to new file rasqal_expr_evaluate.c
2010-12-29 Dave Beckett <[email protected]>
* src/rasqal_expr.c: code style - newline after case break; remove
fallthrough
* src/rasqal_result_formats.c:
(rasqal_get_query_results_formatter_factory): Fix searching by uri
* utils/roqet.c: Compile when built with Raptor V1 for now.
* src/rasqal.h.in, src/rasqal_format_html.c,
src/rasqal_format_json.c, src/rasqal_format_rdf.c,
src/rasqal_format_sparql_xml.c, src/rasqal_format_sv.c,
src/rasqal_format_table.c, src/rasqal_general.c,
src/rasqal_internal.h, src/rasqal_result_formats.c,
src/rdql_parser.y, src/sparql_parser.y: Update factories to use
raptor V2 1.9.2+ or internal syntax description
* configure.ac: Raptor V2 min version is now 1.9.2 for syntax
description changes.
2010-12-28 Dave Beckett <[email protected]>
* utils/srxread.c: Use
rasqal_world_get_query_results_format_description() and print all
mime types.
* utils/roqet.c: Use
rasqal_world_get_query_results_format_description()
* src/rasqal_internal.h, src/rasqal_result_formats.c: Set query
results format flags in registration
(rasqal_world_register_query_results_format_factory): Set
desc.flags based on presence/absence of factory methods. Tidy
code and rename arg to be register_factory
* src/rasqal_format_rdf.c: Copy mime type information from raptor
syntax descriptions for Raptor V2
(rasqal_query_results_format_rdf_copy_syntax_description_from_parser):
Added to copy mime type static info for RDF query result formats.
* src/rasqal.h.in, src/rasqal_result_formats.c: Added method to
get syntax description for query results formats
(rasqal_world_get_query_results_format_description): Added,
deprecating rasqal_query_results_formats_enumerate() and
rasqal_query_results_formatter_get_mime_type()
* src/rasqal_format_rdf.c, src/rasqal_internal.h,
src/rasqal_result_formats.c: Add finish cleanup method for query
results formatter context
rasqal_query_results_finish_func added for finish method.
rasqal_query_results_format_factory gains finish factory method.
(rasqal_free_query_results_formatter): Call finish method if present
before cleaning up context.
rasqal_query_results_format_rdf gains static URIs used for reading
(rasqal_query_results_rdf_init, rasqal_query_results_rdf_finish):
Allocate and free static URIs.
(rasqal_query_results_rdf_write): Use static URIs rather than
allocate each time. Use rasqal_query_results_rdf_finish in rdfxml
and turtle format cleanup factory methods.
* src/Makefile.am, src/rasqal_format_rdf.c,
src/rasqal_format_turtle.c: Provide read/write for turtle query
results using RDF formatter for reading
rasqal_query_results_format_rdf gains read and write format name
fields.
(rasqal_query_results_rdf_init): Init read and write format name
fields based on formatter name used.
(rasqal_query_results_rdf_write): Renamed from
rasqal_query_results_write_rdf. Use write_format_name from
formatter context.
(rasqal_rowsource_rdf_process): use read_format_name from
formatter context.
(rasqal_query_results_rdf_get_rowsource): Renamed from
rasqal_query_results_get_rowsource_rdf.
(rasqal_query_results_rdfxml_register_factory): Updated for
renames above.
(rasqal_query_results_turtle_write): Merge turtle writer function
into the rdf formatter code. Still preserved since prettier than
what raptor does for rdf query results in turtle.
(rasqal_query_results_turtle_register_factory): Merged into rdf
formatter code and uses rasqal_query_results_rdf_get_rowsource to
read turtle query results.
l
2010-12-27 Dave Beckett <[email protected]>
* src/rasqal_format_html.c, src/rasqal_format_json.c,
src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c,
src/rasqal_format_sv.c, src/rasqal_format_table.c,
src/rasqal_format_turtle.c, src/rasqal_internal.h,
src/rasqal_result_formats.c: Query result formatter gains init
method, optional context and pass in formatter
Following raptor_parser factory pattern allow each formatter to have
some saved state on construction that can be used.
Adjust the factory methods to pass in formatter arg to get at
formatter->context.
rasqal_query_results_init_func typedef added for init function.
rasqal_query_results_format_factory gains context_length field and
init function. Loses mime_type field that is now handled by
factory syntax description.
rasqal_query_results_formatter gains context field.
(rasqal_new_query_results_formatter2): Allocate context field if
needed and call init function if present.
(rasqal_free_query_results_formatter): Free context if present.
(rasqal_query_results_formatter_get_mime_type): use first mime
type string from factory syntax description.
(rasqal_query_results_formatter_write,
rasqal_query_results_formatter_read): Pass in formatter arg to
factory methods.
(rasqal_query_results_rdf_init): Added as init function for rdf
formatter.
* src/rasqal_format_html.c, src/rasqal_format_json.c,
src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c,
src/rasqal_format_sv.c, src/rasqal_format_table.c,
src/rasqal_format_turtle.c, src/rasqal_internal.h,
src/rasqal_result_formats.c: Remove unused
rasqal_query_results_format_factory method reader; rename writer
to write
* src/rasqal_format_html.c, src/rasqal_format_json.c,
src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c,
src/rasqal_format_sv.c, src/rasqal_format_table.c,
src/rasqal_format_turtle.c: Switch query result formats to use
static rasqal_query_results_format_factory initialisation
* src/rasqal_internal.h, src/rasqal_result_formats.c: Switch
rasqal_query_results_format_factory to use a
raptor_syntax_description
* utils/srxread.c: Show format mime type
2010-12-26 Dave Beckett <[email protected]>
* src/rasqal_dataset.c:
(rasqal_dataset_load_graph_iostream): Handle being called multiple
times.
* utils/roqet.c, utils/srxread.c:
Remove bogus use of feature count
for query results format enumeration.
* utils/srxwrite.c:
Remove SRX branding
* utils/srxread.c:
Usage message, remove SRX branding
* src/rasqal_result_formats.c:
(rasqal_query_results_formats_enumerate): set reader flag if
get_rowsource is there.
2010-12-26 Dave Beckett <[email protected]>
* src/rasqal_internal.h, src/rasqal_raptor.c: Make
rasqal_raptor_error_handler static again
* src/rasqal_dataset.c: rasqal_dataset_raptor_error_handler is
static
* src/rasqal_dataset.c:
(rasqal_dataset_raptor_error_handler): Added for Raptor V1
* src/rasqal_dataset.c: Handle base URI in triple match (if
present)
* utils/.gitignore: ignore less
* src/rasqal_format_sparql_xml.c: crash fix when called on non
sparql XML
* src/rasqal_format_rdf.c: code tidy
* src/rasqal_format_rdf.c: Move RDF formatter to rasqal_dataset
internal API
* src/Makefile.am: Add rasqal_dataset internal API
* src/rasqal_dataset.c, src/rasqal_internal.h: Add rasqal_dataset
internal API
* src/rasqal_data_graph.c: # code style
2010-12-25 Dave Beckett <[email protected]>
* src/rasqal_format_rdf.c: Do not build
rasqal_query_results_write_rdf for raptor V1
* src/rasqal_format_sparql_xml.c, src/rasqal_literal.c: Allow
writing RASQAL_LITERAL_UDT in Turtle and SPARQL XML
* src/rasqal_format_rdf.c: Fix rs:resultVariable URI. Serialize
RASQAL_LITERAL_UDT
* src/rasqal_format_rdf.c: message
* src/rasqal_format_rdf.c: Free resource
* src/rasqal_format_rdf.c:
(rasqal_query_results_write_rdf): Implement writing rdfxml
* utils/Makefile.am, utils/rdfr_read.c: Remove rdfr_read example;
srxread.c can do it
* src/rasqal_format_rdf.c, src/rasqal_internal.h,
src/rasqal_raptor.c: Export rasqal_raptor_error_handler()
internally
* src/Makefile.am, src/rasqal_format_rdf.c, src/rasqal_internal.h,
src/rasqal_raptor.c, src/rasqal_result_formats.c: Add RDF Query
Results format reading
* utils/rdfr_read.c: uri allocation tidy
* utils/rdfr_read.c: ws
* utils/rdfr_read.c: Add binding iterator. Add
get_source/get_target helpers
* utils/rdfr_read.c: code tidy
* utils/rdfr_read.c: Added (sigh) yet another iterator class.
* utils/rdfr_read.c: Added simple iterator
* utils/.gitignore, utils/Makefile.am, utils/rdfr_read.c: Add
skeleton of code for reading rdf serialized query results
* src/rasqal_internal.h, src/rasqal_raptor.c: Make
raptor_statement_as_rasqal_triple() available to internal code.
2010-12-22 Dave Beckett <[email protected]>
* src/sparql_parser.y: Start state is Sparql with Query or Update
alternatives.
* src/sparql_common.h, src/sparql_parser.y: Split SPARQL 1.1 into
sparql11-query, sparql11-update and sparql11 languages
struct rasqal_sparql_query_language_s gains flags for sparql_query
and sparql11_query plus some comments.
Updated SPARQL query grammar tokens to check for sparql_query flag
and return error.
Updated SPARQL update grammar tokens to reword error message to
mention update.
(rasqal_sparql11_query_language_register_factory,
rasqal_sparql11_update_language_register_factory): Added to
register the sparql11-query and sparql11-update names with
different descriptions and URIs.
2010-12-20 Dave Beckett <[email protected]>
* src/rasqal_decimal.c: Restrict decimal as double range to
DBL_DIG digits
* src/rasqal_decimal.c: Fix XSD decimal formatting to match
canonical lexical format.
(rasqal_xsd_decimal_as_string): Use appropriate library snprintf
and then prune trailing 0s
* src/rasqal_decimal.c: Canonical XSD decimal 0 is 0.0 not 0.0E0
* src/rasqal_xsd_datatypes.c:
(rasqal_xsd_format_double): Canonical xsd:double uses capital E.
* src/rasqal_rowsource_having.c:
(rasqal_having_rowsource_read_row): Do not rebind row.
2010-12-20 Lauri Aalto <[email protected]>
* src/rasqal_rowsource_aggregation.c:
(rasqal_builtin_agg_expression_execute_step): Fixed debug
conditional
2010-12-19 Dave Beckett <[email protected]>
* src/rasqal_decimal.c:
(rasqal_xsd_decimal_as_string): Round to precision digits for
MPFR/GMP.
* src/rasqal_decimal.c, src/rasqal_rowsource_aggregation.c: MPFR
operation return code is rounding not an error code - ignore. Add
debugging for agg step values
* tests/sparql/check-sparql: Handle SPARQL 1.1 test namespace,
sparql11 language and new update types.
* tests/sparql/check-sparql: Use GIT
* src/rasqal_literal.c: Fix promotion of numerics to decimal
(rasqal_new_literal_from_promotion): Promote to decimal via double
rather than string values which is both better and more accurate.
* src/rasqal_rowsource_aggregation.c:
(rasqal_builtin_agg_expression_execute_step): Set error if result
is NULL.
2010-12-18 Dave Beckett <[email protected]>
* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_query_write.c,
src/sparql_lexer.l, src/sparql_parser.y: Added SPARQL 1.1 CONCAT()
rasqal_op gains RASQAL_EXPR_CONCAT
(rasqal_new_expr_seq_expression): Added, replacing deprecated
rasqal_new_coalece_expression
(rasqal_new_coalesce_expression): Deprecated for above.
Add init/free/print code for CONCAT()
Execute concat by evaluating values as strings and building a plain
literal. Not clear if it is allowed to work on URIs or what to do
with errors; right now it stringify URIs and stops at an expression
in the arg with an error.
(CoalesceExpression): Use rasqal_new_expr_seq_expression
(BuiltInCall): Added CONCAT() support using
rasqal_new_expr_seq_expression()
2010-12-16 Dave Beckett <[email protected]>
* src/rasqal_expr.c: Add new laqrs keywords to rasqal_op_labels
* docs/tmpl/section-expression.sgml: Update doc tmpls
2010-12-15 Dave Beckett <[email protected]>
* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_query_results.c,
src/rasqal_query_write.c, src/sparql_lexer.l, src/sparql_parser.y:
Add experimental LAQRS NOW()/CURRENT_DATETIME(), FROM_UNIXTIME() and
TO_UNIXTIME() builtin functions
Added builtins enabled by use of the 'laqrs' query language.
NOW()/CURRENT_DATETIME() are synonyms to return an XSD datetime for
the current datetime. At the first execution/preparation of the
query, the value is set as a constant throughout the life of the
query execution.
FROM_UNIXTIME() turns an integer value into an XSD DateTime
TO_UNIXTIME() turns an XSD DateTime into an integer value.
These functions are likely not opposites since they do not take into
consideration leap seconds or daylight saving time changes.
LAQRS (SPARQL) grammar gains new terminals NOW, CURRENT_DATETIME,
FROM_UNIXTIME and TO_UNIXTIME.
(DatetimeExtensions) Added to grammar, only allowing the terms
when query language is LAQRS.
(BuiltInCall): Call above.
rasqal_op gains new expressions RASQAL_EXPR_CURRENT_DATETIME,
RASQAL_EXPR_NOW, RASQAL_EXPR_FROM_UNIXTIME and
RASQAL_EXPR_TO_UNIXTIME.
(rasqal_expression_clear, rasqal_expression_write,
rasqal_expression_print, rasqal_expression_is_constant,
rasqal_expression_is_compare,
rasqal_query_write_sparql_expression): Updated all expression
functions to handle new expressions operations.
(rasqal_expression_evaluate): Execute new operations.
* src/rasqal_general.c, src/rasqal_internal.h: Add methods to
world class for getting current datetime timeval.
(rasqal_world_reset_now): Invalidate any cached current datetime
(rasqal_world_get_now_timeval): Get current datetime as a timeval.
rasqal_world_s gains a struct timeval now field and a bit flag to
know when it is set.
* src/rasqal.h.in, src/rasqal_datetime.c:
(rasqal_new_xsd_datetime_from_timeval): Added to make a new
datetime from struct timeval*
* src/rasqal.h.in, src/rasqal_literal.c:
(rasqal_new_datetime_literal_from_datetime): Added to make a
datetime literal
* src/rasqal.h.in, src/rasqal_datetime.c:
(rasqal_new_xsd_datetime_from_unixtime): Added to create a
datetime from a unix time int
2010-12-14 Dave Beckett <[email protected]>
* src/rasqal.h.in: autodocs
* configure.ac, src/rasqal_datetime.c: Define HAVE_TM_GMTOFF and
use to detect this non-portable field of struct tm
2010-12-14 Lauri Aalto <[email protected]>
* src/rasqal_datetime.c:
(rasqal_xsd_datetime_set_from_timeval): Fix compilation errors
systems where time_t and struct timeval tv_sec are of different
types (e.g. long, int)
* src/rasqal_expr.c:
(rasqal_expression_evaluate): Init vars.i in any case to keep some
optimizing compilers happy
2010-12-13 Dave Beckett <[email protected]>
* configure.ac, src/rasqal.h.in, src/rasqal_datetime.c: Add
datetime to/from unix times and timevals
(rasqal_xsd_datetime_set_from_timeval,
rasqal_xsd_datetime_set_from_unixtime,
rasqal_xsd_datetime_get_as_unixtime,
rasqal_xsd_datetime_get_as_timeval): Added.
Added automake substitutions so that sys/time.h and/or time.h get
include in rasqal.h in order to get the timeval and time_t
definitions.
* src/rasqal.h.in, src/rasqal_datetime.c: Store full timezone
minutes offset in rasqal_xsd_datetime
rasqal_xsd_datetime gains timezone_minutes field with sentinel
value RASQAL_XSD_DATETIME_NO_TZ when there is no timezone.
(rasqal_xsd_datetime_normalize): Normalize timezone to Zulu here.
(rasqal_xsd_datetime_parse): Save but do not normalize timezone.
(rasqal_xsd_datetime_to_counted_string): Generate none, Zulu or
timezone offset setings.
2010-12-12 Dave Beckett <[email protected]>
* src/rasqal_datetime.c:
Fix datetime equals method
(rasqal_xsd_datetime_equals): Compare field by field since memcmp
fails due to padding bytes.
* src/rasqal_datetime.c: Fix rasqal_xsd_datetime_compare
comparison order
(rasqal_xsd_datetime_compare): Datetime comparison should be
negative for dt1 earlier than dt2.
* src/rasqal_literal.c:
(rasqal_literal_compare): break after datetime compare
2010-12-07 Dave Beckett <[email protected]>
* src/rasqal.h.in, src/rasqal_datetime.c, src/rasqal_expr.c:
(rasqal_xsd_datetime_get_seconds_as_decimal): Added
* src/rasqal_expr.c: Add "isnumeric" to rasqal_op_labels
* src/rasqal_expr.c: Make SECONDS() return decimal correctly
* src/sparql_parser.y: Accept datetime accessor builtins
(DatetimeBuiltinAccessors): Added
(BuiltInCall): Use above as an alternative
* src/rasqal_expr.c:
Add labels for datetime accessors
* src/sparql_parser.y:
(BuiltInCall): Initialize isnumeric expression properly. Now works.
* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_literal.c,
src/rasqal_query_write.c, src/rasqal_xsd_datatypes.c,
src/sparql_lexer.l, src/sparql_parser.y: Added datetime accessor
builtin functions: YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS and
TIMEZONE
rasqal_op gains RASQAL_EXPR_YEAR, RASQAL_EXPR_MONTH,
RASQAL_EXPR_DAY, RASQAL_EXPR_HOURS, RASQAL_EXPR_MINUTES,
RASQAL_EXPR_SECONDS, RASQAL_EXPR_TIMEZONE.
(rasqal_expression_clear, rasqal_expression_visit,
rasqal_expression_write, rasqal_expression_print,
rasqal_expression_is_constant, rasqal_expression_compare,
rasqal_query_write_sparql_expression): Added handling for datetime
accessor builtins.
(rasqal_expression_evaluate): Evaluate datetime accessor builtins
mostly returning integer, seconds returns decimal and timezone
TBD.
rasqal_sparql_op_labels: Add labels for the builtins.
(YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS, TIMEZONE): Added
tokens to SPARQL grammar
* src/rasqal.h.in, src/rasqal_datetime.c, src/rasqal_internal.h:
rasqal_xsd_datetime functions take/return const char* strings
* src/rasqal.h.in: rasqal_data_graph format_type and format_name
fields are not const.
* src/rasqal_data_graph.c:
(rasqal_new_data_graph_common): Replace strncpy with memcpy.
* src/rasqal.h.in, src/rasqal_datetime.c, src/rasqal_literal.c:
Added equals and compare methods for XSD datetime
(rasqal_xsd_datetime_equals, rasqal_xsd_datetime_compare): Added.
(rasqal_literal_compare): Use rasqal_xsd_datetime_compare.
(rasqal_literal_equals_flags): Use rasqal_xsd_datetime_equals.
* src/rasqal.h.in, src/rasqal_literal.c: Add datetime to rasqal
literal union
Now xsd:dateTime objects use the rasqal_xsd_datetime class and get a
new literal union value.
(rasqal_literal_set_typed_value): Set value.datetime as well as
the string field when a datetime is found.
(rasqal_free_literal): Free datetime.
* src/rasqal.h.in, src/rasqal_datetime.c:
(rasqal_xsd_datetime_to_counted_string): Added.
(rasqal_xsd_datetime_to_string): Edit to wrap above
* src/rasqal_datetime.c: Split datetime parsing and normalizing
(rasqal_xsd_datetime_parse): Renamed from
rasqal_xsd_datetime_parse_and_normalize_common and remove call to
rasqal_xsd_datetime_normalize() at end.
(rasqal_xsd_datetime_parse_and_normalize,
rasqal_xsd_date_parse_and_normalize, rasqal_new_xsd_datetime):
Update callers to call rasqal_xsd_datetime_parse() and
rasqal_xsd_datetime_normalize() in order.
* src/rasqal.h.in, src/rasqal_datetime.c: XSD datetime holds
microseconds now
rasqal_xsd_decimal gains int microseconds field replacing
second_frac string.
(rasqal_xsd_datetime_parse_and_normalize_common): Fill microseconds
field.
(rasqal_xsd_datetime_to_string): Format microseconds in
result.
(main): Adjust tests to allow 4th digit of decimal digits to work.
2010-12-06 Dave Beckett <[email protected]>
* src/rasqal.h.in, src/rasqal_datetime.c: Added XSD DateTime class
to public API
Made rasqal_xsd_datetime struct public with public
fields.
(rasqal_new_xsd_datetime, rasqal_free_xsd_datetime): Added
constructor and destructor.
(rasqal_xsd_datetime_to_string): Added method to get datetime as
canonical string format.
* NEWS.html, RELEASE.html, configure.ac:
Bumped version to 0.9.22
2010-12-05 Dave Beckett <[email protected]>
* NEWS.html: 0.9.21 add release notes pointer
2010-12-04 Dave Beckett <[email protected]>
* Snapshotted rasqal_0_9_21 for 0.9.21 release (GIT
ec8c54cccd2cf2fdc716ac90dfb66f5d06b0a138)
* INSTALL.html, README.html: update notes encouraging use of
release tarballs, more using rasqal sections
* docs/tmpl/section-service.sgml:
Add section-service descriptions
* utils/Makefile.am:
Update for moved fix script
* docs/.gitignore:
Ignore rasqal-fake.i
* docs/tmpl/section-data.sgml, docs/tmpl/section-expression.sgml,
docs/tmpl/section-general.sgml,
docs/tmpl/section-graph_pattern.sgml,
docs/tmpl/section-literal.sgml, docs/tmpl/section-prefix.sgml,
docs/tmpl/section-query.sgml,
docs/tmpl/section-query_results_formatter.sgml,
docs/tmpl/section-triples_source.sgml,
docs/tmpl/section-variable.sgml: Update tmpls
* Makefile.am, configure.ac, docs/Makefile.am, fix-groff-xhtml,
scripts/Makefile.am, scripts/fix-bison, scripts/fix-flex,
scripts/fix-groff-xhtml, scripts/fix-gtkdoc-header.pl,
src/Makefile.am, src/fix-bison, src/fix-flex: Add scripts dir,
move fix* scripts there and fixup gtkdoc-header with fake
mechanism like raptor
2010-12-03 Dave Beckett <[email protected]>
* src/rasqal.h.in, src/rasqal_internal.h, src/rasqal_raptor.c,
src/rasqal_triples_source.c: Rename rasqal_triple_source_feature
to rasqal_triples_source_feature to match other names
* src/rasqal.h.in: autodocs
* src/rasqal.h.in:
Add RASQAL_API for rasqal_expression_compare
* src/rasqal_literal.c: rasqal_literal_sequence_equals debug print
less
* src/rasqal.h.in: Declare RASQAL_RAPTOR_VERSION to record what
version of raptor was built with.
* configure.ac: Save raptor version that rasqal was built with in
RAPTOR_VERSION_DEC
2010-12-02 Dave Beckett <[email protected]>
* src/rasqal_datetime.c: internal docs
* src/rasqal_datetime.c: code style
* tests/sparql/aggregate/Makefile.am: Add group-concat-4 files to
dist
* tests/sparql/aggregate/Makefile.am,
tests/sparql/aggregate/group-concat-4.rq,
tests/sparql/aggregate/group-concat-4.ttl,
tests/sparql/aggregate/manifest.n3: Add group-concat-4* test for
GROUP DISTINCT
* src/rasqal_rowsource_aggregation.c: Initialise group DISTINCT at
start/end of each group
(rasqal_aggregation_rowsource_init): Remove init of distinct map
(rasqal_aggregation_rowsource_read_row): Destroy/create a distinct
map at the group boundaries.
* tests/sparql/aggregate/group-concat-2.rq: Test GROUP_CONCAT()
with default separator
* configure.ac, tests/algebra/Makefile.am,
tests/engine/Makefile.am, tests/laqrs/syntax/Makefile.am,
tests/rdql/Makefile.am, tests/rdql/testsuite/Makefile.am,
tests/sparql/Expr1/Makefile.am, tests/sparql/Expr2/Makefile.am,
tests/sparql/ExprBuiltins/Makefile.am,
tests/sparql/ExprEquals/Makefile.am,
tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
tests/sparql/SyntaxFull/Makefile.am,
tests/sparql/ValueTesting/Makefile.am,
tests/sparql/aggregate/Makefile.am,
tests/sparql/bound/Makefile.am, tests/sparql/bugs/Makefile.am,
tests/sparql/examples/Makefile.am,
tests/sparql/federated/Makefile.am,
tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
tests/sparql/sparql11/Makefile.am,
tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
tests/sparql/update/Makefile.am: Use local echo subst vars RECHO*
and real echo program
* src/rasqal_rowsource_aggregation.c: Add DISTINCTing of aggregate
expression results in aggregate expressions.
Remove literal_seq from expr_data
(rasqal_aggregation_rowsource_read_row): Use
rasqal_expression_sequence_evaluate() to make a new sequence of
literals each time. If a duplicate is found, do not evaluate a
step.
* src/rasqal_expr.c, src/rasqal_internal.h,
src/rasqal_rowsource_groupby.c, src/rasqal_rowsource_having.c:
Make rasqal_expression_sequence_evaluate() return a new seq of
literal each time
(rasqal_expression_sequence_evaluate): Lose literals_seq argument
This was an unused and confusing approach. A new list each time
is easier to deal with. Update all callers to
rasqal_expression_sequence_evaluate()
* src/rasqal_literal.c: Add tests for literal sequence sort map
2010-11-27 Dave Beckett <[email protected]>
* src/rasqal_map.c:
(rasqal_free_map_node): Free key / value only if there is a free
handler.
* src/rasqal_map.c:
(rasqal_free_map_node): Free value properly
* src/rasqal_internal.h: Fixes for building with raptor V1
* src/rasqal_internal.h, src/rasqal_literal.c,
src/rasqal_rowsource_aggregation.c: Added literal sequence sorting
support
(rasqal_new_literal_sequence_sort_map):
Added
(rasqal_literal_sequence_sort_map_add_literal_sequence): Added.
* src/rasqal_literal.c:
(rasqal_literal_sequence_equals): Added
* src/Makefile.am, src/rasqal_internal.h, src/rasqal_literal.c:
Add rasqal_literal_test
2010-11-25 Dave Beckett <[email protected]>
* src/rasqal_algebra.c, src/rasqal_engine_sort.c,
src/rasqal_internal.h, src/rasqal_map.c: Alter rasqal_map
signature to take separate key/value free methods
Add new typedef for raptor V1 for raptor_data_print_handler.
(rasqal_new_map): Replaces rasqal_kv_free_fn free_fn arg with
raptor_data_free_handler free_key_fn and free_value_fn. Remove
prototype ifdef for raptor V1/V2.
Update all callers of rasqal_new_map().
(rasqal_free_map_node): Pass in map arg down when freeing tree.
2010-11-19 Dave Beckett <[email protected]>
* src/rasqal_engine_sort.c, src/rasqal_internal.h,
src/rasqal_literal.c: Move literal array equals/compare functions
to literal module
(rasqal_literal_array_compare): Renamed from
rasqal_engine_rowsort_compare_literals_sequence - takes two arrays
not sequences.
(rasqal_literal_array_equals): Renamed from
rasqal_engine_rowsort_literal_sequence_equals() - takes two arrays
not sequences.
* src/Makefile.am, src/rasqal_algebra.c,
src/rasqal_engine_algebra.c, src/rasqal_internal.h,
src/rasqal_rowsource_having.c, tests/sparql/aggregate/agg-1.ttl,
tests/sparql/aggregate/group-concat-3.rq,
tests/sparql/aggregate/group-concat-3.ttl: Add support for SPARQL
1.1 query HAVING
rasqal_algebra_node_operator gains new algebra operator
RASQAL_ALGEBRA_OPERATOR_HAVING
rasqal_algebra_node updated field notes for having to use seq of
expressions.
(rasqal_new_having_algebra_node): Added.
(rasqal_algebra_query_add_having): Added to add a having algebra
node to the tree of algebra nodes
(rasqal_algebra_having_algebra_node_to_rowsource): Added to turn a
having algebra node into a having rowsource.
(rasqal_algebra_node_to_rowsource): Call above for
RASQAL_ALGEBRA_OPERATOR_HAVING.
* src/rasqal_rowsource_groupby.c:
(rasqal_groupby_rowsource_read_row): Bind result row to variables.
* docs/tmpl/section-variable.sgml: update tmpls
2010-11-17 Dave Beckett <[email protected]>
* src/rasqal_engine_algebra.c:
(rasqal_query_engine_algebra_execute_init): Project before Order By
* src/rasqal_rowsource_aggregation.c: Support COUNT(*) and
COUNT(expr list)
* src/rasqal.h.in: rasqal_variable gains usage field.
* src/rasqal_algebra.c, src/rasqal_bindings.c, src/rasqal_query.c,
src/rasqal_query_transform.c, src/rasqal_row.c,
src/rasqal_rowsource.c, src/rasqal_rowsource_aggregation.c,