Skip to content

Commit

Permalink
remove native operations docs
Browse files Browse the repository at this point in the history
  • Loading branch information
py committed Feb 7, 2025
1 parent 3ff6ba7 commit 912c8e1
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 60 deletions.
13 changes: 0 additions & 13 deletions docs/how-to-build-with-ddn/with-sqlserver.mdx

This file was deleted.

1 change: 1 addition & 0 deletions docs/reference/connectors/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ If you're getting started with a connector and want to connect it to your data s
- [MySQL](/reference/connectors/mysql/index.mdx)
- [Oracle](/reference/connectors/oracle/index.mdx)
- [PostgreSQL](/reference/connectors/postgresql/index.mdx)
- [SQL Server](/reference/connectors/sqlserver/index.mdx)
4 changes: 2 additions & 2 deletions docs/reference/connectors/sqlserver/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "SQLServer",
"position": 4
"label": "SQL Server",
"position": 6
}

100 changes: 90 additions & 10 deletions docs/reference/connectors/sqlserver/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ The `connectionUri` field indicates the uri of the database which the connector
either as a literal value, or sourced from an environment variable (to help with sound credentials storage for
instance).

The SQL Server database URL should follow the [MSSQL connection URI form][libpq: Connection Strings]

**Examples:**

```yaml
Expand Down Expand Up @@ -110,8 +108,7 @@ Consult the [json schema reference][Configuration JSON Schema] for details.
{
"foreignTable": "Artist",
"columnMapping": {
// Column of this table : Column of the referenced table
"ArtistId": "ArtistId"
"ArtistId": "ArtistId" // Column of this table : Column of the referenced table
}
},
},
Expand All @@ -122,11 +119,10 @@ Consult the [json schema reference][Configuration JSON Schema] for details.

### `nativeQueries`

This is a JSON object containing key-value pairs of Native Queries to be used in the data connector.

Two types of Native Queries are supported: **Inline** and **Parameterized**.
Native Queries collect user-specified SQL queries that that may become either queryable collections in the generated
connector schema.

TODO: check if the info is correct
This is a JSON object containing key-value pairs of Native Queries to be used in the data connector.

Example:

Expand Down Expand Up @@ -188,13 +184,54 @@ Example:
"description": null,
"isProcedure": false
}
}
```

### `nativeMutations`

Native Mutations collect user-specified SQL queries that that may become mutations in the generated connector schema.

This is a JSON object containing key-value pairs of Native Mutations to be used in the data connector.

Examle and extra info TODO
```
{
"nativeMutations": {
"insert_artist_and_return_id": {
"sql": "INSERT INTO [dbo].[Artist] (ArtistId, Name) OUTPUT inserted.* VALUES ({{ArtistId}}, {{Name}})",
"columns": {
"ArtistId": {
"name": "ArtistId",
"type": "int",
"nullable": "nonNullable",
"description": null
},
"Name": {
"name": "Name",
"type": "varchar",
"nullable": "nullable",
"description": null,
"castAs": "varchar(100)"
}
},
"arguments": {
"ArtistId": {
"name": "ArtistId",
"type": "int",
"nullable": "nonNullable",
"description": null
},
"Name": {
"name": "Name",
"type": "varchar",
"nullable": "nullable",
"description": null
}
},
"description": null
}
}
}
```
### `aggregateFunctions`
Expand Down Expand Up @@ -303,7 +340,50 @@ the scalar type declaration of its first argument.

### `storedProcedures`

TODO
This is a JSON object containing key-value pairs of Stored Procedures to be used in the data connector.

Example

```
{
"storedProcedures": {
"GetArtistsByName": {
"name": "GetArtistsByName",
"schema": "dbo",
"arguments": {
"Name": {
"name": "Name",
"type": "varchar",
"nullable": "nullable",
"isOutput": false,
"description": null
}
},
"returns": {
"CustomerId": {
"name": "CustomerId",
"type": "int",
"nullable": "nonNullable",
"description": null
},
"Phone": {
"name": "Phone",
"type": "varchar",
"nullable": "nonNullable",
"description": null
},
"TotalPurchases": {
"name": "TotalPurchases",
"type": "int",
"nullable": "nonNullable",
"description": null
}
},
"description": null
}
}
}
```

## Updating with introspection

Expand Down
13 changes: 4 additions & 9 deletions docs/reference/connectors/sqlserver/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@ seoFrontMatterUpdated: false
The Native Data Connector for SQL Server supports all kinds of queries and mutations. In the sections below, we'll try
to give an overview of the features of the SQL Server connector and how to configure it in a Hasura DDN project.

:::tip Looking to get started?

If you've ended up here and aren't concerned about tweaking your configuration, and rather are looking to get started
with SQL Server and Hasura DDN as quickly as possible, check out our
[SQL Server tutorial](/how-to-build-with-ddn/with-sqlserver.mdx) or
[learn how to connect](/data-sources/connect-to-a-source.mdx) to a SQL Server instance.

:::
Hasura DDN includes a Native Data Connector for SQL Server, providing integration with SQL Server databases. This connector
allows you to leverage SQL Server’s powerful relational database capabilities while taking advantage of Hasura’s
metadata-driven approach. Here, we’ll explore the key features of the SQL Server connector and walk through the
configuration process within a Hasura DDN project.

## SQL Server docs

- [Connector configuration](/reference/connectors/sqlserver/configuration.mdx)
- [Native operations](/reference/connectors/sqlserver/native-operations/index.mdx)

This file was deleted.

22 changes: 0 additions & 22 deletions docs/reference/connectors/sqlserver/native-operations/index.mdx

This file was deleted.

0 comments on commit 912c8e1

Please sign in to comment.