Skip to content

Commit

Permalink
document the new CLI command
Browse files Browse the repository at this point in the history
  • Loading branch information
codingkarthik committed Sep 16, 2024
1 parent 5503842 commit c6ad1e4
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions docs/usage/stored_procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,23 @@ In this guide, we'll look at how to use stored procedures with the ndc-sqlserver

## Tracking Stored Procedures

The ndc-sqlserver connector can track stored procedures in a SQL Server database. The stored
procedures present in the database are automatically added while introspecting the database
via the `update` operation. The stored procedures will appear in the `$.metadata.storedProcedures`
The ndc-sqlserver connector can track stored procedures in a SQL Server database.

The stored procedures present in the database can be added by running the following command:

```
ddn connector plugin --connector app/sqlserver/connector.yaml -- stored-procedures
```

If you want to overwrite the existing stored procedures,

```
ddn connector plugin --connector app/sqlserver/connector.yaml -- stored-procedures --overwrite
```



After running the above command, the stored procedures will appear in the `$.metadata.storedProcedures`
key of the configuration that is generated by the `update` operation.


Expand Down Expand Up @@ -99,6 +113,12 @@ we can add a return type for it, as following:
}
```

### Marking required arguments as `nonNullable`

If your stored procedure contains a required argument, then you can mark the argument as `nonNullable`
which will enable to throw a validation error as soon as possible. For example, in the above, the `Phone` field
is a required argument, hence it is marked as `nonNullable`.

## Schema of Stored Procedures

## Schema
Expand Down

0 comments on commit c6ad1e4

Please sign in to comment.