Skip to content

Commit 2d88022

Browse files
Updated interface names in doc.go
Signed-off-by: Raymond Cypher <[email protected]>
1 parent e42a5db commit 2d88022

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ See the documentation for dbsql/errors for more information.
237237
238238
The driver supports the ability to retrieve Apache Arrow record batches.
239239
To work with record batches it is necessary to use sql.Conn.Raw() to access the underlying driver connection to retrieve a driver.Rows instance.
240-
The driver exposes two public interfaces for working with record batches:
240+
The driver exposes two public interfaces for working with record batches from the rows sub-package:
241241
242-
type DBSQLRows interface {
243-
GetArrowBatches(context.Context) (DBSQLArrowBatchIterator, error)
242+
type Rows interface {
243+
GetArrowBatches(context.Context) (ArrowBatchIterator, error)
244244
}
245245
246-
type DBSQLArrowBatchIterator interface {
246+
type ArrowBatchIterator interface {
247247
// Retrieve the next arrow.Record.
248248
// Will return io.EOF if there are no more records
249249
Next() (arrow.Record, error)
@@ -255,8 +255,8 @@ The driver exposes two public interfaces for working with record batches:
255255
Close()
256256
}
257257
258-
The driver.Rows instance retrieved using Conn.Raw() can be converted to DBSQLRows via a type assertion, then use GetArrowBatches() to retrieve a batch iterator.
259-
If the DBSQLArrowBatchIterator is not closed it will leak resources, such as the underlying connection.
258+
The driver.Rows instance retrieved using Conn.Raw() can be converted to a Databricks Rows instance via a type assertion, then use GetArrowBatches() to retrieve a batch iterator.
259+
If the ArrowBatchIterator is not closed it will leak resources, such as the underlying connection.
260260
Calling code must call Release() on records returned by DBSQLArrowBatchIterator.Next().
261261
262262
Example usage:
@@ -288,7 +288,7 @@ Example usage:
288288
}
289289
defer rows.Close()
290290
291-
batches, err := rows.(dbsqlrows.DBSQLRows).GetArrowBatches(context.BackGround())
291+
batches, err := rows.(dbsqlrows.Rows).GetArrowBatches(context.BackGround())
292292
if err != nil {
293293
log.Fatalf("unable to get arrow batches. err: %v", err)
294294
}

0 commit comments

Comments
 (0)