Commit Graph

11079 Commits (a9866e11875986a4e7be73fd38f535fedea318d0)
 

Author SHA1 Message Date
Nat Mote bd6912a801
Add test for type_query precedence 2022-06-21 16:16:43 +07:00
Max Brunsfeld 2b9e9e0d23 0.20.0 2022-06-21 12:02:51 +07:00
Tim Luo 1196535079 Improve VALUES clause 2022-06-21 23:40:55 +07:00
Christian Frøystad 3b2af709a9 Fixes bugs in nowdoc implementation 2022-06-21 12:13:51 +07:00
Tim Luo eb962a95c8 Improve the drop statement 2022-06-21 02:10:30 +07:00
Jonathan Arnett ed604993ba
Forbid anonymous function parameter labels (#34)
Corresponds to gleam-lang/gleam#1629
2022-06-20 13:13:52 +07:00
Tim Luo 26f3ff5f2e Improve CREATE TYPE statement 2022-06-20 22:56:46 +07:00
Pieter Goetschalckx cc26b1ef11
Cache examples in Github workflow 2022-06-19 21:41:43 +07:00
Pieter Goetschalckx dcc477e3c2
Bump rust version and add test (#58)
* Update .gitignore

* Update README

* Update rust docs

* Bump rust version

* Add rust test
2022-06-19 21:36:54 +07:00
Max Novikov 370a66ecb1
Merge pull request #33 from m-novikov/float-support
Add float number support
2022-06-19 17:06:51 +07:00
Maksim Novikov 3e2433f5a6
Add float number support 2022-06-19 17:00:29 +07:00
Maksim Novikov 5a22eb8602
Merge branch 'function-calls' 2022-06-19 16:40:13 +07:00
Wilfred Hughes 79ad6b7ed2 Move split_on_newlines tests to the defining file 2022-06-19 15:30:34 +07:00
Maksim Novikov 4bb2bbe6ed
Merge branch 'create-function-trigger' 2022-06-19 16:26:04 +07:00
Maksim Novikov f0d0f27f22
Fix codestyle 2022-06-19 15:46:08 +07:00
Maksim Novikov 148b442971
Merge branch 'merico' 2022-06-19 15:41:45 +07:00
Max Novikov 162db936a4
Merge pull request #32 from m-novikov/add-pre-commit
Add pre-commit config
2022-06-19 15:38:35 +07:00
Maksim Novikov 71c75697f4
Remove update playground 2022-06-19 15:36:08 +07:00
Maksim Novikov e123cc2dde
Add pre-commit config 2022-06-19 15:35:04 +07:00
Maksim Novikov bc5651c5d9
Merge branch 'mhoffm-add-real-world-corpus' 2022-06-19 15:25:32 +07:00
Pieter Goetschalckx bcad5b2630
Bump tree-sitter to 0.20 2022-06-18 23:00:30 +07:00
Pieter Goetschalckx b1af6f443b
Update, add and fix tests 2022-06-18 22:59:36 +07:00
Max Novikov acc5784b7e
Merge pull request #30 from m-novikov/update-github-pipeline
Update github workflow to validate build
2022-06-18 08:01:30 +07:00
Maksim Novikov e699698ed0
Update github workflow to validate build 2022-06-18 07:57:49 +07:00
Max Novikov cc77682dc3
Merge pull request #26 from m-novikov/pain
External parser for dollar quoted strings
2022-06-18 07:55:51 +07:00
Torsten Schmits 14bf3061a3
bump tree-sitter in Cargo.toml (#85)
* bump tree-sitter is Cargo.toml

* Update Cargo.toml

Co-authored-by: Logan Wemyss <62594135+VixieTSQ@users.noreply.github.com>

* regenerate bindings

Co-authored-by: Logan Wemyss <62594135+VixieTSQ@users.noreply.github.com>
2022-06-17 15:14:50 +07:00
Logan Wemyss e91d3a3762 highlights.scm and locals.scm exist, so uncomment them 2022-06-16 11:42:31 +07:00
Wilfred Hughes bef61be1ab cargo fmt 2022-06-15 16:39:55 +07:00
Wilfred Hughes 6c45e74220 Move split_on_newlines to the lines module 2022-06-15 16:38:26 +07:00
Wilfred Hughes 4e6eb1de42 Document the trailing newline behaviour for split_on_newlines 2022-06-15 16:31:17 +07:00
Wilfred Hughes 3147eb8e6a Prefer splitting source by newline once
This is a small performance reduction (0.2% increase in instruction
count for the file in #293) but simplifies the code and ensures we're
splitting with the same logic everywhere.
2022-06-15 16:24:23 +07:00
Wilfred Hughes 6ade73138c Skip printed lines when computing hunk matched lines
This function is hot for textual diffs, such as the sample files in
issue #293. For those files, this produces a 21% reduction in
instruction count.
2022-06-15 01:07:25 +07:00
Tim Luo f1a4b8c896 Improve create function statement & support create trigger statement 2022-06-15 03:35:15 +07:00
Wilfred Hughes 95ba06ab23 Remove pointless vec copy 2022-06-13 22:34:40 +07:00
Wilfred Hughes 1c9e05ed0c Ignore generated flamegraphs 2022-06-13 21:52:12 +07:00
Wilfred Hughes ed168635c9 Use 32-bit integers for line numbers
This saves 16% time, 18% memory and 1% instruction counts from the
sample files in #293. These are large files, treated as textual diffs,
so reducing the storage per-line is significant. Files with structural
diffing, such as sample_files/slow_before.rs, are unchanged.

Fixes #293
Closes #297
2022-06-13 21:47:19 +07:00
Wilfred Hughes 5d5eaea84e Store column numbers as a u32
It's reasonable to assume that a single column won't exceed four
billion, and this is a small speedup (1% instruction count reduction
on the sample file in #293).
2022-06-13 21:26:02 +07:00
Wilfred Hughes e48c27cfb9 Next release will be 0.30 2022-06-13 16:51:16 +07:00
Wilfred Hughes 17f98a7f4d Next release will be 0.29.1 2022-06-13 16:49:55 +07:00
Tim Luo 740cecbbb8 Update npm scripts 2022-06-13 14:56:30 +07:00
Tim Luo 8d09bf6af0 Support CTE, CASE, etc.
New supportings:
  - CTEs syntax;
  - DELETE statement;
  - ALTER TABLE RENAME COLUMN;
  - Conditional expressions;
  - LIMIT clause;
  - AT TIME ZONE expression;

Improvements:
  - The ORDER BY clause;
  - The JOIN clause;
  - The select_subexpression;
  - The UPDATE statement;
  - Array type;
  - $.type: multi-words types (VARYING, PRECISION, WITH/WITHOUT TIME ZONE);
  - The $.field_access expression to $.json_access expression;
2022-06-13 14:55:27 +07:00
Wilfred Hughes ae42762a6d Fix mimalloc perf regression in 57a4b6d6ce
It looks like we were allocating large buffers for wu-diff, and
mimalloc performance is much worse for this case in the new version.

This reverts performance back to that 0.28 for large files,
such as the example in #297.
2022-06-13 02:02:01 +07:00
Wilfred Hughes 84dfcd8b5b Only consider the first 1,000 bytes in binary file detection
This is sufficient, and we were spending a lot of time in this
function in the sample files from #297.
2022-06-12 23:45:00 +07:00
Maksim Novikov 5340f94f45
Add initial support of TRUNCATE statement
Extend support of COMMENT and INSERT
2022-06-12 16:29:43 +07:00
Maksim Novikov 2685131425
Improve support of INSERT, COMMENT expressions 2022-06-12 16:10:27 +07:00
Maksim Novikov 2bce477da0
Add COMMENT ON statement support 2022-06-12 15:50:06 +07:00
Maksim Novikov aabbcf3fe3
Add support for more statements
* ALTER SCHEMA
* ALTER TABLE ... OWNER TO ...
* CREATE EXTENSION ... [SCHEMA, VERSION, CASCADE]
* CREATE FUNCTION LANGUAGE as quoted string
2022-06-12 15:28:30 +07:00
Maksim Novikov 14e8ba8839
Support double quote escaping in strings 2022-06-12 14:48:49 +07:00
Maksim Novikov c3d3b38557
Intorduce external parser for dollar quoted strings
PostgreSQL supports stings of the following format $TAG$mycontent$TAG$
https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING

These strings often used to define a function body.
2022-06-12 11:03:02 +07:00
Max Novikov 2ec2fedbb3
Merge pull request #25 from m-novikov/m-novikov-insert
Add transaction statements and imrove existing statements support
2022-06-11 22:57:56 +07:00