From 2c4a3694e4629beb5bd7c73c17e76bb0403d3ac2 Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Wed, 17 Dec 2025 15:07:33 +0100 Subject: [PATCH 1/3] Update SQL schema reading docs: migrate schema methods to `DataFrameSchema` Adjusted documentation to reflect changes introduced in `Beta-4`, moving schema-related methods from `DataFrame` to `DataFrameSchema` companion object. Added examples leveraging `DataSource` for connection pooling and HikariCP usage. --- docs/StardustDocs/topics/readSqlDatabases.md | 237 +++++++++++++++---- 1 file changed, 197 insertions(+), 40 deletions(-) diff --git a/docs/StardustDocs/topics/readSqlDatabases.md b/docs/StardustDocs/topics/readSqlDatabases.md index dd6e613177..df2e74674d 100644 --- a/docs/StardustDocs/topics/readSqlDatabases.md +++ b/docs/StardustDocs/topics/readSqlDatabases.md @@ -23,15 +23,21 @@ There are two main blocks of available functionality: * ```readResultSet``` reads from created earlier ResultSet * ```readAllSqlTables``` reads all tables (all non-system tables) * Methods for reading table schemas - * ```getSchemaForSqlTable``` for specific tables - * ```getSchemaForSqlQuery``` for result of executing SQL queries - * ```getSchemaForResultSet``` for created earlier `ResultSet` - * ```getSchemaForAllSqlTables``` for all non-system tables - -All methods above can be accessed like `DataFrame.getSchemaFor...()` via a companion for `DataFrame`. + * ```readSqlTable``` on `DataFrameSchema` for specific tables + * ```readSqlQuery``` on `DataFrameSchema` for a result of executing SQL queries + * ```readResultSet``` on `DataFrameSchema` for created earlier `ResultSet` + * ```readAllSqlTables``` on `DataFrameSchema` for all non-system tables + +>**NOTE (Beta-4 changes):** +> +> Starting from version **```Beta-4```**, methods for reading table schemas have been moved from `DataFrame` companion object to `DataFrameSchema` companion object. +> +> Use `DataFrameSchema.readSqlTable()` instead of `DataFrame.getSchemaForSqlTable()`, +> +> `DataFrameSchema.readSqlQuery()` instead of `DataFrame.getSchemaForSqlQuery()`, etc. Also, there are a few **extension functions** available on `Connection`, -`ResultSet`, and `DbConnectionConfig` objects. +`ResultSet`, `DbConnectionConfig`, and `DataSource` objects. * Methods for reading data from a database * ```readDataFrame``` on `Connection` or `DbConnectionConfig` @@ -43,13 +49,14 @@ Also, there are a few **extension functions** available on `Connection`, * ```getDataFrameSchema``` on `ResultSet` for created earlier `ResultSet` -**NOTE:** This is an experimental module, and for now, -we only support these databases: MS SQL, MariaDB, MySQL, PostgreSQL, SQLite, and DuckDB. - -Moreover, since release 0.15 we support the possibility to register custom SQL database, read more in our [guide](readSqlFromCustomDatabase.md). - -Additionally, support for JSON and date-time types is limited. -Please take this into consideration when using these functions. +> **NOTE:** This is an experimental module, and for now, +> we only support these databases: MS SQL, MariaDB, MySQL, PostgreSQL, SQLite, and DuckDB. +> +> Moreover, since release 0.15 we support the possibility to register custom SQL database, read more in our [guide](readSqlFromCustomDatabase.md). +> +> Additionally, support for JSON and date-time types is limited. +> +> Please take this into consideration when using these functions. ## Getting started with reading from SQL database in a Gradle Project @@ -221,6 +228,26 @@ val users = DataFrame.readSqlTable(connection, "Users") connection.close() ``` +**readSqlTable(dataSource: DataSource, tableName: String, limit: Int, inferNullability: Boolean, dbType: DbType?): AnyFrame** + +Another variant, where instead of `connection: Connection` we use a `DataSource` object (useful for connection pooling with HikariCP). + +```kotlin +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource + +val config = HikariConfig().apply { + jdbcUrl = "URL_TO_CONNECT_DATABASE" + username = "USERNAME" + password = "PASSWORD" + maximumPoolSize = 10 + minimumIdle = 2 +} +val dataSource = HikariDataSource(config) + +val users = DataFrame.readSqlTable(dataSource, "Users") +``` + ### Extension functions for reading SQL table The same example, rewritten with the extension function: @@ -290,6 +317,26 @@ val df = DataFrame.readSqlQuery(connection, "SELECT * FROM Users WHERE age > 35" connection.close() ``` +**readSqlQuery(dataSource: DataSource, sqlQuery: String, limit: Int, inferNullability: Boolean, dbType: DbType?): AnyFrame** + +Another variant, where instead of `connection: Connection` we use a `DataSource` object (useful for connection pooling with HikariCP). + +```kotlin +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource + +val config = HikariConfig().apply { + jdbcUrl = "URL_TO_CONNECT_DATABASE" + username = "USERNAME" + password = "PASSWORD" + maximumPoolSize = 10 + minimumIdle = 2 +} +val dataSource = HikariDataSource(config) + +val df = DataFrame.readSqlQuery(dataSource, "SELECT * FROM Users WHERE age > 35") +``` + ### Extension functions for reading a result of an SQL query The same example, rewritten with the extension function: @@ -380,7 +427,7 @@ that the `ResultSet` belongs to. These functions read all data from all tables in the connected database. Variants with a limit parameter restrict how many rows will be read from each table. -**readAllSqlTables(dbConfig: DbConnectionConfig, limit: Int, inferNullability: Boolean, dbType: DbType?): Map\** +**readAllSqlTables(dbConfig: DbConnectionConfig, limit: Int, inferNullability: Boolean, dbType: DbType?): Map** Retrieves data from all the non-system tables in the SQL database and returns them as a map of table names to `AnyFrame` objects. @@ -396,7 +443,7 @@ val dbConfig = DbConnectionConfig("URL_TO_CONNECT_DATABASE", "USERNAME", "PASSWO val dataframes = DataFrame.readAllSqlTables(dbConfig) ``` -**readAllSqlTables(connection: Connection, limit: Int, inferNullability: Boolean, dbType: DbType?): Map\** +**readAllSqlTables(connection: Connection, limit: Int, inferNullability: Boolean, dbType: DbType?): Map** Another variant, where instead of `dbConfig: DbConnectionConfig` we use a JDBC connection: `Connection` object. @@ -411,13 +458,33 @@ val dataframes = DataFrame.readAllSqlTables(connection) connection.close() ``` +**readAllSqlTables(dataSource: DataSource, limit: Int, inferNullability: Boolean, dbType: DbType?): Map** + +Another variant, where instead of `connection: Connection` we use a `DataSource` object (useful for connection pooling with HikariCP). + +```kotlin +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource + +val config = HikariConfig().apply { + jdbcUrl = "URL_TO_CONNECT_DATABASE" + username = "USERNAME" + password = "PASSWORD" + maximumPoolSize = 10 + minimumIdle = 2 +} +val dataSource = HikariDataSource(config) + +val dataframes = DataFrame.readAllSqlTables(dataSource) +``` + ## Schema reading for a specific SQL table The purpose of these functions is to facilitate the retrieval of table schema. By providing a table name and either a database configuration or connection, these functions return the [DataFrameSchema](schema.md) of the specified table. -**getSchemaForSqlTable(dbConfig: DbConnectionConfig, tableName: String, dbType: DbType?): DataFrameSchema** +**DataFrameSchema.readSqlTable(dbConfig: DbConnectionConfig, tableName: String, dbType: DbType?): DataFrameSchema** This function captures the schema of a specific table from an SQL database. @@ -427,27 +494,50 @@ Typically, it requires a URL, username, and password. ```kotlin import org.jetbrains.kotlinx.dataframe.io.DbConnectionConfig +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema val dbConfig = DbConnectionConfig("URL_TO_CONNECT_DATABASE", "USERNAME", "PASSWORD") -val schema = DataFrame.getSchemaForSqlTable(dbConfig, "Users") +val schema = DataFrameSchema.readSqlTable(dbConfig, "Users") ``` -**getSchemaForSqlTable(connection: Connection, tableName: String, dbType: DbType?): DataFrameSchema** +**DataFrameSchema.readSqlTable(connection: Connection, tableName: String, dbType: DbType?): DataFrameSchema** Another variant, where instead of `dbConfig: DbConnectionConfig` we use a JDBC connection: `Connection` object. ```kotlin import java.sql.Connection import java.sql.DriverManager +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema val connection = DriverManager.getConnection("URL_TO_CONNECT_DATABASE") -val schema = DataFrame.getSchemaForSqlTable(connection, "Users") +val schema = DataFrameSchema.readSqlTable(connection, "Users") connection.close() ``` +**DataFrameSchema.readSqlTable(dataSource: DataSource, tableName: String, dbType: DbType?): DataFrameSchema** + +Another variant, where instead of `connection: Connection` we use a `DataSource` object (useful for connection pooling with HikariCP). + +```kotlin +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema + +val config = HikariConfig().apply { + jdbcUrl = "URL_TO_CONNECT_DATABASE" + username = "USERNAME" + password = "PASSWORD" + maximumPoolSize = 10 + minimumIdle = 2 +} +val dataSource = HikariDataSource(config) + +val schema = DataFrameSchema.readSqlTable(dataSource, "Users") +``` + ## Schema reading from an SQL query These functions return the schema of an SQL query result. @@ -455,7 +545,7 @@ These functions return the schema of an SQL query result. Once you provide a database configuration or connection and an SQL query, they return the [DataFrameSchema](schema.md) of the query result. -**getSchemaForSqlQuery(dbConfig: DbConnectionConfig, sqlQuery: String, dbType: DbType?): DataFrameSchema** +**DataFrameSchema.readSqlQuery(dbConfig: DbConnectionConfig, sqlQuery: String, dbType: DbType?): DataFrameSchema** This function executes an SQL query on the database and then retrieves the resulting schema. @@ -465,27 +555,50 @@ Typically, it requires a URL, username, and password. ```kotlin import org.jetbrains.kotlinx.dataframe.io.DbConnectionConfig +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema val dbConfig = DbConnectionConfig("URL_TO_CONNECT_DATABASE", "USERNAME", "PASSWORD") -val schema = DataFrame.getSchemaForSqlQuery(dbConfig, "SELECT * FROM Users WHERE age > 35") +val schema = DataFrameSchema.readSqlQuery(dbConfig, "SELECT * FROM Users WHERE age > 35") ``` -**getSchemaForSqlQuery(connection: Connection, sqlQuery: String, dbType: DbType?): DataFrameSchema** +**DataFrameSchema.readSqlQuery(connection: Connection, sqlQuery: String, dbType: DbType?): DataFrameSchema** Another variant, where instead of `dbConfig: DbConnectionConfig` we use a JDBC connection: `Connection` object. ```kotlin import java.sql.Connection import java.sql.DriverManager +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema val connection = DriverManager.getConnection("URL_TO_CONNECT_DATABASE") -val schema = DataFrame.getSchemaForSqlQuery(connection, "SELECT * FROM Users WHERE age > 35") +val schema = DataFrameSchema.readSqlQuery(connection, "SELECT * FROM Users WHERE age > 35") connection.close() ``` +**DataFrameSchema.readSqlQuery(dataSource: DataSource, sqlQuery: String, dbType: DbType?): DataFrameSchema** + +Another variant, where instead of `connection: Connection` we use a `DataSource` object (useful for connection pooling with HikariCP). + +```kotlin +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema + +val config = HikariConfig().apply { + jdbcUrl = "URL_TO_CONNECT_DATABASE" + username = "USERNAME" + password = "PASSWORD" + maximumPoolSize = 10 + minimumIdle = 2 +} +val dataSource = HikariDataSource(config) + +val schema = DataFrameSchema.readSqlQuery(dataSource, "SELECT * FROM Users WHERE age > 35") +``` + ### Extension functions for schema reading from an SQL query or an SQL table The same example, rewritten with the extension function: @@ -496,15 +609,15 @@ import java.sql.DriverManager val connection = DriverManager.getConnection("URL_TO_CONNECT_DATABASE") -val schema = connection.getDataFrameSchema("SELECT * FROM Users WHERE age > 35") +val schema = connection.readDataFrameSchema("SELECT * FROM Users WHERE age > 35") connection.close() ``` -**Connection.getDataFrameSchema(sqlQueryOrTableName: String, dbType: DbType?): DataFrameSchema** +**Connection.readDataFrameSchema(sqlQueryOrTableName: String, dbType: DbType?): DataFrameSchema** -Retrieves the schema of an SQL query result or an SQL table using the provided database configuration. +Retrieves the schema of an SQL query result or an SQL table using the provided database connection. -**DbConnectionConfig.getDataFrameSchema(sqlQueryOrTableName: String, dbType: DbType?): DataFrameSchema** +**DbConnectionConfig.readDataFrameSchema(sqlQueryOrTableName: String, dbType: DbType?): DataFrameSchema** Retrieves the schema of an SQL query result or an SQL table using the provided database configuration. @@ -517,7 +630,27 @@ import org.jetbrains.kotlinx.dataframe.io.DbConnectionConfig val dbConfig = DbConnectionConfig("URL_TO_CONNECT_DATABASE", "USERNAME", "PASSWORD") -val schema = dbConfig.getDataFrameSchema("SELECT * FROM Users WHERE age > 35") +val schema = dbConfig.readDataFrameSchema("SELECT * FROM Users WHERE age > 35") +``` + +**DataSource.readDataFrameSchema(sqlQueryOrTableName: String, dbType: DbType?): DataFrameSchema** + +Retrieves the schema of an SQL query result or an SQL table using the provided `DataSource`. + +```kotlin +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource + +val config = HikariConfig().apply { + jdbcUrl = "URL_TO_CONNECT_DATABASE" + username = "USERNAME" + password = "PASSWORD" + maximumPoolSize = 10 + minimumIdle = 2 +} +val dataSource = HikariDataSource(config) + +val schema = dataSource.readDataFrameSchema("SELECT * FROM Users WHERE age > 35") ``` ## Schema reading from ResultSet @@ -527,7 +660,7 @@ These functions return the schema from a `ResultSet` provided by the user. This can help developers infer the structure of the result set, which is quite essential for data transformation and mapping purposes. -**getSchemaForResultSet(resultSet: ResultSet, dbType: DbType): DataFrameSchema** +**DataFrameSchema.readResultSet(resultSet: ResultSet, dbType: DbType): DataFrameSchema** This function reads the schema from a `ResultSet` object provided by the user. @@ -539,9 +672,10 @@ Also, users have an ability to pass objects, describing their custom databases, ```kotlin import org.jetbrains.kotlinx.dataframe.io.db.PostgreSql +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema import java.sql.ResultSet -val schema = DataFrame.getSchemaForResultSet(resultSet, PostgreSql) +val schema = DataFrameSchema.readResultSet(resultSet, PostgreSql) ``` ### Extension functions for schema reading from the ResultSet @@ -552,21 +686,21 @@ The same example, rewritten with the extension function: import org.jetbrains.kotlinx.dataframe.io.db.PostgreSql import java.sql.ResultSet -val schema = resultSet.getDataFrameSchema(PostgreSql) +val schema = resultSet.readDataFrameSchema(PostgreSql) ``` based on -**ResultSet.getDataFrameSchema(dbType: DbType): DataFrameSchema** +**ResultSet.readDataFrameSchema(dbType: DbType): DataFrameSchema** ## Schema reading for all non-system tables These functions return a list of all [`DataFrameSchema`](schema.md) from all the non-system tables in the SQL database. They can be called with either a database configuration or a connection. -**getSchemaForAllSqlTables(dbConfig: DbConnectionConfig, dbType: DbType?): Map\** +**DataFrameSchema.readAllSqlTables(dbConfig: DbConnectionConfig, dbType: DbType?): Map** -This function retrieves the schema of all tables from an SQL database +This function retrieves the schema of all tables from an SQL database and returns them as a map of table names to [`DataFrameSchema`](schema.md) objects. The `dbConfig: DbConnectionConfig` parameter represents the configuration for a database connection, @@ -575,24 +709,47 @@ Typically, it requires a URL, username, and password. ```kotlin import org.jetbrains.kotlinx.dataframe.io.DbConnectionConfig +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema val dbConfig = DbConnectionConfig("URL_TO_CONNECT_DATABASE", "USERNAME", "PASSWORD") -val schemas = DataFrame.getSchemaForAllSqlTables(dbConfig) +val schemas = DataFrameSchema.readAllSqlTables(dbConfig) ``` -**getSchemaForAllSqlTables(connection: Connection, dbType: DbType?): Map\** +**DataFrameSchema.readAllSqlTables(connection: Connection, dbType: DbType?): Map** -This function retrieves the schema of all tables using a JDBC connection: `Connection` object -and returns them as a list of [`DataFrameSchema`](schema.md). +This function retrieves the schema of all tables using a JDBC connection: `Connection` object +and returns them as a map of table names to [`DataFrameSchema`](schema.md). ```kotlin import java.sql.Connection import java.sql.DriverManager +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema val connection = DriverManager.getConnection("URL_TO_CONNECT_DATABASE") -val schemas = DataFrame.getSchemaForAllSqlTables(connection) +val schemas = DataFrameSchema.readAllSqlTables(connection) connection.close() ``` + +**DataFrameSchema.readAllSqlTables(dataSource: DataSource, dbType: DbType?): Map** + +Another variant, where instead of `connection: Connection` we use a `DataSource` object (useful for connection pooling with HikariCP). + +```kotlin +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource +import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema + +val config = HikariConfig().apply { + jdbcUrl = "URL_TO_CONNECT_DATABASE" + username = "USERNAME" + password = "PASSWORD" + maximumPoolSize = 10 + minimumIdle = 2 +} +val dataSource = HikariDataSource(config) + +val schemas = DataFrameSchema.readAllSqlTables(dataSource) +``` From f73e44770d08caa92dd394647d31996784fd98e0 Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Wed, 17 Dec 2025 15:22:35 +0100 Subject: [PATCH 2/3] Expand `DbType` documentation with advanced customization methods Updated the documentation to include new advanced customization options for the `DbType` class, covering performance settings, query building, connection handling, and type mapping. Added detailed explanations and examples for overriding methods and properties. --- .../topics/readSqlFromCustomDatabase.md | 116 +++++++++++++++++- 1 file changed, 114 insertions(+), 2 deletions(-) diff --git a/docs/StardustDocs/topics/readSqlFromCustomDatabase.md b/docs/StardustDocs/topics/readSqlFromCustomDatabase.md index f3e2660493..cbb1720321 100644 --- a/docs/StardustDocs/topics/readSqlFromCustomDatabase.md +++ b/docs/StardustDocs/topics/readSqlFromCustomDatabase.md @@ -70,8 +70,8 @@ public object HSQLDB : DbType("hsqldb") { val schemaName = tableMetadata.schemaName val name = tableMetadata.name return schemaName.containsWithLowercase("information_schema") || - schemaName.containsWithLowercase("system") || - name.containsWithLowercase("system_") + schemaName.containsWithLowercase("system") || + name.containsWithLowercase("system_") } override fun buildTableMetadata(tables: ResultSet): TableMetadata = @@ -167,3 +167,115 @@ Running the `main` function above will output filtered rows from the `orders` ta It will also demonstrate how to define and use custom SQL database extensions in the DataFrame library. Find a full example project [here](https://github.com/zaleslaw/KotlinDataFrame-SQL-Examples/tree/master/src/main/kotlin/customdb). + +The core principles of working with `DbType` remain the same, and the example with HSQLDB demonstrates the basic implementation pattern. However, the `DbType` class now offers more methods for customization to give you greater control over database integration. + +## Advanced Customization Options + +For advanced users, the `DbType` class provides additional properties and methods that can be overridden to fine-tune database integration: + +### Performance and Configuration Properties + +You can customize default performance-related settings: + +```kotlin +/** + * Specifies the default batch size for fetching rows from the database during query execution. + * Value is set to 1000 by default. + */ +public open val defaultFetchSize: Int = 1000 + +/** + * Specifies the default timeout in seconds for database queries. + * If set to `null`, no timeout is applied, allowing queries to run indefinitely. + */ +public open val defaultQueryTimeout: Int? = null // null = no timeout +``` + +### Query Building and Statement Configuration + +Override these methods to customize SQL query generation and statement configuration: + +```kotlin +/** + * Builds a SELECT query for reading from a table. + */ +public open fun buildSelectTableQueryWithLimit(tableName: String, limit: Int?): String + +/** + * Configures the provided `PreparedStatement` for optimized read operations. + * This method sets the fetch size for efficient streaming, applies a query timeout if specified, + * and configures the fetch direction to forward-only for better performance in read-only operations. + */ +public open fun configureReadStatement(statement: PreparedStatement) + +/** + * Quotes an identifier (table or column name) according to database-specific rules. + * Examples: + * - PostgreSQL: "tableName" or "schema"."table" + * - MySQL: `tableName` or `schema`.`table` + * - MS SQL: [tableName] or [schema].[table] + * - SQLite/H2: no quotes for simple names + */ +public open fun quoteIdentifier(name: String): String + +/** + * Constructs a SQL query with a limit clause. + */ +public open fun buildSqlQueryWithLimit(sqlQuery: String, limit: Int = 1): String +``` + +### Connection and Data Handling + +For specialized connection handling and data extraction: + +```kotlin +/** + * Creates a database connection using the provided configuration. + * Some databases (like Sqlite) require read-only mode to be set during connection creation + * rather than after the connection is established. + */ +public open fun createConnection(dbConfig: DbConnectionConfig): Connection + +/** + * Extracts a value from the ResultSet for the given column. + * This method can be overridden by custom database types to provide specialized parsing logic. + */ +public open fun extractValueFromResultSet( + rs: ResultSet, + columnIndex: Int, + columnMetadata: TableColumnMetadata, + kType: KType, +): Any? + +/** + * Builds a single DataColumn with proper type handling. + */ +public open fun buildDataColumn( + name: String, + values: MutableList, + kType: KType, + inferNullability: Boolean, +): DataColumn<*> +``` + +### Type Mapping and Metadata + +For custom type mappings and metadata extraction: + +```kotlin +/** + * Creates a mapping between common SQL types and their corresponding KTypes. + */ +public open fun makeCommonSqlToKTypeMapping(tableColumnMetadata: TableColumnMetadata): KType + +/** + * Retrieves column metadata from a JDBC ResultSet. + * This method reads column metadata from ResultSetMetaData with graceful fallbacks + * for JDBC drivers that throw SQLFeatureNotSupportedException for certain methods. + */ +public open fun getTableColumnsMetadata(resultSet: ResultSet): List +``` + +> **Note:** The set of overridable methods and properties may change in the next Beta release as we continue to improve the API based on user feedback. + From 285b2d5a4d52f47c6ddb842601a0404a4eb13c28 Mon Sep 17 00:00:00 2001 From: zaleslaw Date: Thu, 18 Dec 2025 10:35:17 +0100 Subject: [PATCH 3/3] Clarify SQL method descriptions and adjust grammar in documentation --- docs/StardustDocs/topics/readSqlDatabases.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/StardustDocs/topics/readSqlDatabases.md b/docs/StardustDocs/topics/readSqlDatabases.md index df2e74674d..586c77fde2 100644 --- a/docs/StardustDocs/topics/readSqlDatabases.md +++ b/docs/StardustDocs/topics/readSqlDatabases.md @@ -24,13 +24,13 @@ There are two main blocks of available functionality: * ```readAllSqlTables``` reads all tables (all non-system tables) * Methods for reading table schemas * ```readSqlTable``` on `DataFrameSchema` for specific tables - * ```readSqlQuery``` on `DataFrameSchema` for a result of executing SQL queries - * ```readResultSet``` on `DataFrameSchema` for created earlier `ResultSet` + * ```readSqlQuery``` on `DataFrameSchema` for a specific SQL query + * ```readResultSet``` on `DataFrameSchema` for a `ResultSet` created earlier * ```readAllSqlTables``` on `DataFrameSchema` for all non-system tables >**NOTE (Beta-4 changes):** > -> Starting from version **```Beta-4```**, methods for reading table schemas have been moved from `DataFrame` companion object to `DataFrameSchema` companion object. +> Starting from a version **```Beta-4```**, methods for reading table schemas have been moved from the `DataFrame` companion object to the `DataFrameSchema` companion object. > > Use `DataFrameSchema.readSqlTable()` instead of `DataFrame.getSchemaForSqlTable()`, >