Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d98b45e
#158 - Added tests entity [skip ci]
starnowski Oct 12, 2025
a517e00
#158 - Added limits for columns [skip ci]
starnowski Oct 14, 2025
bf7da64
#158 - Added tests data (not yet finisehd) [skip ci]
starnowski Oct 14, 2025
e9bf2d4
#158 - Added tests case [skip ci]
starnowski Oct 17, 2025
2617493
#158 - Added implementation (not yet finished) [skip ci]
starnowski Oct 17, 2025
5fbb5d7
#158 - Added implementation (not yet finished) [skip ci]
starnowski Oct 17, 2025
4787b38
#158 - Added implementation (not yet finished) [skip ci]
starnowski Oct 17, 2025
4e829d5
#158 - Change argument type passed to text operator method [skip ci]
starnowski Oct 17, 2025
be88a4d
#158 - Fixed tests case [skip ci]
starnowski Oct 17, 2025
7d2f10c
#158 - Fixed test object
starnowski Oct 17, 2025
a362fba
#158 - Code refactor plus added tests check
starnowski Oct 18, 2025
11757f9
#158 - Added part of query [skip ci]
starnowski Oct 18, 2025
9a01f65
#158 - Added partial implementation [skip ci]
starnowski Oct 19, 2025
eba9205
#158 - Added tests case
starnowski Oct 19, 2025
4cda5e2
#158 - Added in CHANGELOG.md
starnowski Oct 19, 2025
599248d
#158 - Added tests case for the ts_rank_cd function
starnowski Oct 19, 2025
9e45f94
#158 - Added TODO comments
starnowski Oct 19, 2025
b49c85e
#158 - Added note about ranking
starnowski Oct 19, 2025
4cf3407
#158 - Fixed javadoc
starnowski Oct 19, 2025
85701de
#158 - Fixed javadoc
starnowski Oct 19, 2025
fa665d3
#158 - Fixed javadoc
starnowski Oct 19, 2025
6f6c5b7
#158 - Fixed javadoc
starnowski Oct 19, 2025
8b2070a
#158 - Fixed javadoc
starnowski Oct 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ https://www.markdownguide.org/basic-syntax/

## [Unreleased]

## [0.4.4] - 2025-10-19
TODO
- Changed constructor com.github.starnowski.posjsonhelper.text.hibernate6.operators.TextOperatorFunction#TextOperatorFunction(org.hibernate.query.sqm.NodeBuilder, com.github.starnowski.posjsonhelper.text.hibernate6.functions.TSVectorFunction, org.hibernate.query.sqm.tree.expression.SqmExpression, com.github.starnowski.posjsonhelper.core.HibernateContext) to com.github.starnowski.posjsonhelper.text.hibernate6.operators.TextOperatorFunction#TextOperatorFunction(org.hibernate.query.sqm.NodeBuilder, org.hibernate.query.sqm.tree.expression.SqmExpression, org.hibernate.query.sqm.tree.expression.SqmExpression, com.github.starnowski.posjsonhelper.core.HibernateContext) [158](https://github.com/starnowski/posjsonhelper/issues/158)


## [0.4.3] - 2025-06-29

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public interface ISQLDefinition {

/**
* Returns DDL statement that drops changes applied by statement returned by the {@link #getCreateScript()} method.
* <p>
*
* <b>IMPORTANT!</b>
* </p>
*
* By default, there is no assumption that statement has to contains the compensation operation for operation returned by the {@link #getCreateScript()} method.
* This means that the operation can not be by default treated as a rollback operation, but an operation that removes changes applied by statement returned by the {@link #getCreateScript()} method.
* @return DDL statement that drops changes applied by statement returned by the {@link #getCreateScript()} method.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down Expand Up @@ -73,7 +73,7 @@
* document = JsonPath.parse((Object) JsonPath.read(item.getJsonbContent(), "$"));
* assertThat(document.jsonString()).isEqualTo("{\"child\":{\"pets\":[\"cat\"],\"birthday\":\"2021-11-23\"},\"parents\":[{\"name\":\"simone\",\"type\":\"mom\"}],\"inventory\":[\"fins\"],\"nicknames\":{\"school\":\"bambo\"}}");
* }</pre>
* <p>
*
* The above code is going to execute below sql statement for update:
*
* <pre>{@code
Expand All @@ -95,8 +95,8 @@
* where
* id=?
* }</pre>
* <p>
* <p>
*
*
* As it can be observed based on generated SQL, by default, the first operation is going to be an operation that deletes JSON content.
* The most nested jsonb_set operation is going to set property "parents" with value "[]".
*
Expand Down Expand Up @@ -243,7 +243,7 @@ public Hibernate6JsonUpdateStatementBuilder<T, C> withPostSortFilter(JsonUpdateS
* JsonUpdateStatementOperation{jsonTextArray={parents,0}, operation=JSONB_SET, value='{"type":"mom", "name":"simone"}'}
* ]
* }</pre>
* <p>
*
* The expression generated on such would be translated to below sql part:
*
* <pre>{@code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* <pre>{@code
* {{main_func}}( jsonb_extract_path( generatedAlias0.jsonbContent , :param0 ) , json_function_json_array(:param1, :param2))
* }</pre>
* <p>
*
* where:
* {{main_func}} - name of main function returned by method {@link #getFunctionName()}
* jsonb_extract_path( generatedAlias0.jsonbContent , :param0 ) - json path part, with this example path has only one element normally this could part could contain more elements "param"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Posjsonhelper library is an open-source project that adds support of
* Hibernate query for https://www.postgresql.org/docs/10/functions-json.html)
* <p>
*
* Copyright (C) 2023 Szymon Tarnowski
* <p>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p>
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
Expand Down Expand Up @@ -49,7 +49,7 @@
* result.operations
* System.out.println(result.operations)
* }</pre>
* <p>
*
* It generates configuration with below operations:
*
* <pre>{@code
Expand All @@ -60,7 +60,7 @@
* JsonUpdateStatementOperation{jsonTextArray={parents,0}, operation=JSONB_SET, value='{"type":"mom", "name":"simone"}'}
* ]
* }</pre>
* <p>
*
* Assuming that we have database table "item" and column that stores json is called "jsonb_content" the update statement
* would like as below example:
*
Expand All @@ -79,10 +79,10 @@
* WHERE
* id=?
* }</pre>
* <p>
*
* In such a prepared statement, the top operation would set the "parents" property with an empty array.
* The next operation will set the "child, birthday" property to "2021-11-23" and so on.
* <p>
*
* For more details please check {@link #build()} method.
*/
public class JsonUpdateStatementConfigurationBuilder<T> {
Expand Down
Loading