This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch ignite-22681 in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit 40f900922f0ab3c891db6e8e47c13fca9aae15fd Author: amashenkov <[email protected]> AuthorDate: Tue Aug 6 15:34:53 2024 +0300 Remove SQL Session mentioning; --- docs/_docs/developers-guide/clients/java.adoc | 2 +- docs/_docs/quick-start/embedded-mode.adoc | 4 +--- .../api/src/main/java/org/apache/ignite/sql/IgniteSql.java | 2 +- modules/api/src/main/java/org/apache/ignite/sql/README.md | 12 +++++------- .../api/src/main/java/org/apache/ignite/sql/Statement.java | 2 +- .../java/org/apache/ignite/internal/SessionUtils.java | 2 +- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/_docs/developers-guide/clients/java.adoc b/docs/_docs/developers-guide/clients/java.adoc index 13fbceff83..4d39b1839c 100644 --- a/docs/_docs/developers-guide/clients/java.adoc +++ b/docs/_docs/developers-guide/clients/java.adoc @@ -93,7 +93,7 @@ String script = "" + "CREATE TABLE IF NOT EXISTS Person (id int primary key, city_id int, name varchar, age int, company varchar);" + "INSERT INTO Person (1,3, John, 43, Sample)"; -ignite.sql().createSession().executeScript(script); +ignite.sql()..executeScript(script); ---- -- diff --git a/docs/_docs/quick-start/embedded-mode.adoc b/docs/_docs/quick-start/embedded-mode.adoc index 5f2544c8f0..8086fe8dc9 100644 --- a/docs/_docs/quick-start/embedded-mode.adoc +++ b/docs/_docs/quick-start/embedded-mode.adoc @@ -103,15 +103,13 @@ For example, here is how you can create a new table by using an SQL API: [source, java] ---- -try (ResultSet rs = ignite.sql().createSession().execute(null, +try (ResultSet rs = ignite.sql().execute(null, "CREATE TABLE CREATE TABLE IF NOT EXISTS Person (id int primary key,city_id int,name varchar,age int,company varchar)") ) { // no-op } ---- -NOTE: Session is closable, but it is safe to skip `close()` method for DDL and DML queries, as they do not keep cursor open. - More examples of working with Ignite can be found in the link:https://github.com/apache/ignite-3/tree/main/examples[examples] repository. == Next Steps diff --git a/modules/api/src/main/java/org/apache/ignite/sql/IgniteSql.java b/modules/api/src/main/java/org/apache/ignite/sql/IgniteSql.java index 7000090724..d2beea304d 100644 --- a/modules/api/src/main/java/org/apache/ignite/sql/IgniteSql.java +++ b/modules/api/src/main/java/org/apache/ignite/sql/IgniteSql.java @@ -37,7 +37,7 @@ public interface IgniteSql { /** * Creates an SQL statement builder, which provides query-specific settings. - * These settings override the session defaults when the statement is executed. + * These settings override the query execution context defaults when the statement is executed. * * @return A new statement builder. */ diff --git a/modules/api/src/main/java/org/apache/ignite/sql/README.md b/modules/api/src/main/java/org/apache/ignite/sql/README.md index 2a628cdfdb..0b28e83fbf 100644 --- a/modules/api/src/main/java/org/apache/ignite/sql/README.md +++ b/modules/api/src/main/java/org/apache/ignite/sql/README.md @@ -1,13 +1,11 @@ #Apache Ignite SQL API ##Overview -[IgniteSql]('IgniteSql') interface is an entry point for SQL query execution and provide method for creating [SQL session](Session.java) -and [SQL statement](Statement.java). +[IgniteSql]('IgniteSql') interface is an entry point for SQL query execution and methods for running queries in sync, async or reactive +ways and provide method for creating [SQL statement](Statement.java). -An SQL session provide methods for running queries in sync, async and reactive ways and holds a context that queries will be executed against -(e.g. default query timeout, or some hints, which may affects SQL query execution flow, and SQL extension/plugin specific hints). - -SQL statement object represents an SQL query text with the context that overrides the session defaults. +An SQL statement holds a context that queries will be executed against (e.g. default query timeout, or some hints, which may affects +SQL query execution flow, and SQL extension/plugin specific hints). The result of SQL query is represented with [ResultSet](ResultSet.java), [AsyncResultSet](./async/AsyncResultSet.java), and [ReactiveResultSet](./reactive/ReactiveResultSet.java) classes, which provides the result itself and metadata for it. @@ -20,7 +18,7 @@ find this approach easier understanding and using rather than reactive way. ##Reactive query execution Reactive methods provide reactive primitives of Java Flow API for building reactive flows. -Note: These primitives may be hard to use "as is". Thus it is expected users will use some 3-rd party reactive framework for their purpose. +Note: These primitives may be hard to use "as is". Thus it is expected users will use some 3-rd party reactive framework for their purpose. ## Query execution optimization TBD: cover "query plan caching" topic. diff --git a/modules/api/src/main/java/org/apache/ignite/sql/Statement.java b/modules/api/src/main/java/org/apache/ignite/sql/Statement.java index 11e6dd29b3..389436aa3d 100644 --- a/modules/api/src/main/java/org/apache/ignite/sql/Statement.java +++ b/modules/api/src/main/java/org/apache/ignite/sql/Statement.java @@ -77,7 +77,7 @@ public interface Statement { /** * Statement builder provides methods for building a statement object, which represents a query and holds query-specific - * settings that overrides the session defaults. + * settings that overrides the query execution context defaults. */ interface StatementBuilder { /** diff --git a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/SessionUtils.java b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/SessionUtils.java index 9905b3bf51..349eabed87 100644 --- a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/SessionUtils.java +++ b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/SessionUtils.java @@ -23,7 +23,7 @@ import org.apache.ignite.tx.Transaction; import org.jetbrains.annotations.Nullable; /** - * Utils to work with {@link Session}. + * Helper method for running SQL queries. */ public class SessionUtils { /**
