Skip to content

Commit 74b7eb5

Browse files
authored
Merge pull request #17492 from cawrites/framework-edit
Edit Extensibility Framework API Content
2 parents 8402040 + 1cc4272 commit 74b7eb5

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

docs/language-extensions/reference/extensibility-framework-api.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: SQL Server Language Extensions
44
description: You can use the extensibility framework to write programming language extensions for SQL Server. The Extensibility Framework API for Microsoft SQL Server is an API that can be used by a language extension to interact with and exchange data with SQL Server.
55
author: dphansen
66
ms.author: davidph
7-
ms.date: 04/09/2020
7+
ms.date: 10/09/2020
88
ms.topic: reference
99
ms.prod: sql
1010
ms.technology: language-extensions
@@ -15,7 +15,7 @@ monikerRange: ">=sql-server-ver15||>=sql-server-linux-ver15||=sqlallproducts-all
1515

1616
You can use the extensibility framework to write programming language extensions for SQL Server. The Extensibility Framework API for Microsoft SQL Server is an API that can be used by a language extension to interact with and exchange data with SQL Server.
1717

18-
As a language extension author, you can use this reference together with the open-sourced [Java language extension for SQL Server](../how-to/extensibility-sdk-java-sql-server.md) to understand how to use the API for writing your own language extensions. You can find the source code for the Java language extension at [aka.ms/mssql-lang-extensions](https://aka.ms/mssql-lang-extensions).
18+
As a language extension author, you can use this reference together with the open-sourced language extensions to understand how to use the API for writing your own. You can find the source code for the language extensions at [aka.ms/mssql-lang-extensions](https://aka.ms/mssql-lang-extensions).
1919

2020
Find the syntax and arguments information about all API functions below.
2121

@@ -30,7 +30,7 @@ Any output by the extension to the standard output or error streams will be trac
3030

3131
## Init
3232

33-
This function is only called once and is used to initialize the runtime for execution. For example, the Java Extension initializes the JVM.
33+
This function is only called once and is used to initialize the runtime for execution.
3434

3535
### Syntax
3636

@@ -75,7 +75,7 @@ SQLRETURN Init(
7575

7676
## InitSession
7777

78-
This function is called once per session and initializing session specific settings.
78+
This function is called once per session and initializing session-specific settings.
7979

8080
### Syntax
8181

@@ -256,7 +256,7 @@ For SQL_C_CHAR, SQL_C_WCHAR and SQL_C_BINARY data types, values larger than 8000
256256
*StrLen_or_Ind*
257257
\[Input\] An integer value indicating the length in bytes of *ParamValue*, or SQL_NULL_DATA to indicate that the data is NULL.
258258

259-
StrLen_or_Ind\[col\] can be ignored if a column is not nullable and doesn't represents one of the following data types: SQL_C_CHAR, SQL_C_WCHAR and SQL_C_BINARY, SQL_C_NUMERIC or SQL_C_TYPE_TIMESTAMP. Otherwise it points to a valid array with \[RowsNumber\] elements, where each element contains its length or null indicator data.
259+
StrLen_or_Ind\[col\] can be ignored if a column is not nullable and doesn't represent one of the following data types: SQL_C_CHAR, SQL_C_WCHAR and SQL_C_BINARY, SQL_C_NUMERIC or SQL_C_TYPE_TIMESTAMP. Otherwise it points to a valid array with \[RowsNumber\] elements, where each element contains its length or null indicator data.
260260

261261
*InputOutputType*
262262
\[Input\] The type of the parameter. The *InputOutputType* argument is one of the following values:
@@ -298,14 +298,14 @@ When `@parallel = 1` in [sp_execute_external_script](../../relational-databases/
298298
\[Input\] The number of rows in the *Data*.
299299

300300
*Data*
301-
\[Input\] A 2-dimensional array that contains the result set of `@input_data_1` n [sp_execute_external_script](../../relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql.md).
301+
\[Input\] A two-dimensional array that contains the result set of `@input_data_1` n [sp_execute_external_script](../../relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql.md).
302302

303303
The total number of columns is *InputSchemaColumnsNumber* that was received in the [InitSession](#initsession) call. Each column contains *RowsNumber* elements that should be interpreted according to the column type from [InitColumn](#initcolumn).
304304

305305
Elements indicated to be NULL in *StrLen_or_Ind* are not guaranteed to be valid and should be ignored.
306306

307307
*StrLen_or_Ind*
308-
\[Input\] A 2-dimensional array that contains the length/NULL indicator for each value in *Data*. Possible values of each cell:
308+
\[Input\] A two-dimensional array that contains the length/NULL indicator for each value in *Data*. Possible values of each cell:
309309

310310
- n, where n > 0. Indicating the length of the data in bytes
311311
- SQL_NULL_DATA, indicating a NULL value.
@@ -401,19 +401,19 @@ When `@parallel = 1` in [sp_execute_external_script](../../relational-databases/
401401
\[Output\] A pointer to a buffer that contains the number of rows in the *Data*.
402402

403403
*Data*
404-
\[Output\] A pointer to a 2-dimensional array allocated by the extension that contains the result set of `@script` n [sp_execute_external_script](../../relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql.md).
404+
\[Output\] A pointer to a two-dimensional array allocated by the extension that contains the result set of `@script` n [sp_execute_external_script](../../relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql.md).
405405

406406
The total number of columns should be *OutputSchemaColumnsNumber* that was retrieved in the [Execute](#execute) call. Each column should contain *RowsNumber* elements that should be interpreted according to the column type from [GetResultColumn](#getresultcolumn).
407407

408408
*StrLen_or_Ind*
409-
\[Output\] A pointer to a 2-dimensional array allocated by the extension that contains the length/NULL indicator for each value in *Data*. Possible values of each cell:
409+
\[Output\] A pointer to a two-dimensional array allocated by the extension that contains the length/NULL indicator for each value in *Data*. Possible values of each cell:
410410

411411
- n, where n > 0. Indicating the length of the data in bytes
412412
- SQL_NULL_DATA, indicating a NULL value.
413413

414414
The total number of columns should be *OutputSchemaColumnsNumber* that was received in the [Execute](#execute) call. Each column contains *RowsNumber* elements that should be interpreted according to the column type from [GetResultColumn](#getresultcolumn).
415415

416-
StrLen_or_Ind\[col\] will be ignored, if one column is not nullable and doesn't represents one of the following data types: SQL_C_CHAR, SQL_C_WCHAR and SQL_C_BINARY [add dates]. Otherwise it points to a valid array with *RowsNumber* elements, each element contains its length or null indicator data.
416+
StrLen_or_Ind\[col\] will be ignored, if one column is not nullable and doesn't represent one of the following data types: SQL_C_CHAR, SQL_C_WCHAR and SQL_C_BINARY [add dates]. Otherwise it points to a valid array with *RowsNumber* elements, each element contains its length or null indicator data.
417417

418418
## GetOutputParam
419419

@@ -579,7 +579,7 @@ SQLRETURN InstallExternalLibrary(
579579
\[Input\] The length of the LibraryInstallDirectory string.
580580

581581
*LibraryError*
582-
\[Output\] An optional output parameter. In case there was an error during the installation of the library, LibraryError would point to a string describing the error.
582+
\[Output\] An optional output parameter. In case, there was an error during the installation of the library, LibraryError would point to a string describing the error.
583583

584584
*LibraryErrorLength*
585585
\[Output\] The length of the LibraryError string.
@@ -633,4 +633,6 @@ SQLRETURN UninstallExternalLibrary(
633633

634634
## Next steps
635635

636-
- [Microsoft Extensibility SDK for Java for SQL Server](../how-to/extensibility-sdk-java-sql-server.md)
636+
- [Microsoft Extensibility SDK for Java for SQL Server](../how-to/extensibility-sdk-java-sql-server.md)
637+
- [Python custom runtime](../../machine-learning/install/custom-runtime-python.md)
638+
- [R custom runtime](../../machine-learning/install/custom-runtime-r.md).

0 commit comments

Comments
 (0)