Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .hugo_build.lock
Empty file.
1 change: 0 additions & 1 deletion content/clients/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ Console.Write(res.Value.Json);

The `Transaction.Mutate` function allows you to run upserts consisting of one query and one mutation.

To know more about upsert, we highly recommend going through the [upsert block documentation]({{< relref "upsert-block.md" >}}).

```c#
var query = @"
Expand Down
4 changes: 1 addition & 3 deletions content/clients/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@ The `txn.doRequest` function allows you to run upserts consisting of one query a
one mutation. Variables can be defined in the query and used in the mutation.
You could also use `txn.doRequest` to perform a query followed by a mutation.

To know more about upsert, we highly recommend going through the docs at
[upsert-block]({{< relref "mutations/upsert-block.md" >}}).

```java
String query = "query {\n" +
Expand All @@ -408,7 +406,7 @@ txn.doRequest(request);
The upsert block also allows specifying a conditional mutation block using an `@if` directive. The mutation is executed
only when the specified condition is true. If the condition is false, the mutation is silently ignored.

See more about Conditional Upsert [Here]({{< relref "mutations/conditional-upsert.md" >}}).
See more about Conditional Upsert [Here]({{< relref "dql-mutation.md#conditional-upsert" >}}).

```java
String query = "query {\n" +
Expand Down
3 changes: 1 addition & 2 deletions content/clients/javascript/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ The `txn.doRequest` function allows you to run upserts consisting of one query a
Query variables could be defined and can then be used in the mutation. You can also use the
`txn.doRequest` function to perform just a query or a mutation.

To know more about upsert, we highly recommend going through the docs at [upsert-block]({{< relref "mutations/upsert-block.md" >}}).

```js
const query = `
Expand All @@ -317,7 +316,7 @@ await dgraphClient.newTxn().doRequest(req);
The upsert block allows specifying a conditional mutation block using an `@if` directive. The mutation is executed
only when the specified condition is true. If the condition is false, the mutation is silently ignored.

See more about Conditional Upsert [Here]({{< relref "mutations/conditional-upsert.md" >}}).
See more about Conditional Upsert [Here]({{< relref "dql-mutation.md#conditional-upsert" >}}).

```js
const query = `
Expand Down
2 changes: 1 addition & 1 deletion content/clients/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ txn.do_request(request)
The upsert block also allows specifying a conditional mutation block using an `@if` directive. The mutation is executed
only when the specified condition is true. If the condition is false, the mutation is silently ignored.

See more about Conditional Upserts [here]({{< relref "mutations/conditional-upsert.md" >}}).
See more about Conditional Upserts [here]({{< relref "dql-mutation.md#conditional-upsert" >}}).

```python
query = """
Expand Down
3 changes: 2 additions & 1 deletion content/clients/raw-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ be used in all subsequent interactions with Dgraph for this transaction, and so
should become part of the transaction state.

## Run a Mutation

Mutations can be done over HTTP by making a `POST` request to an Alpha's `/mutate` endpoint.
Now that we have the current balances, we need to send a mutation to Dgraph
with the updated balances. If Bob transfers $10 to Alice, then the RDFs to send
are:
Expand Down Expand Up @@ -197,6 +197,7 @@ We get some `keys`. These should be added to the set of `keys` stored in the
transaction state. We also get some `preds`, which should be added to the set of
`preds` stored in the transaction state.


## Committing the transaction

{{% notice "note" %}}
Expand Down
2 changes: 0 additions & 2 deletions content/deploy/dgraph-administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ This stops the Alpha on which the command is executed and not the entire cluster

## Delete database

Individual triples, patterns of triples and predicates can be deleted as described in the [DQL docs]({{< relref "mutations/delete.md" >}}).

To drop all data, you could send a `DropAll` request via `/alter` endpoint.

Alternatively, you could:
Expand Down
20 changes: 10 additions & 10 deletions content/dgraph-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ The difference with Dgraph is that no resolvers or custom queries are needed. Si

For complex queries that the GraphQL specification does not support, Dgraph provides a query language called "DQL" which is inspired by GraphQL, but includes more features. With GraphQL simple use cases remain simple, and with DQL more complex cases become possible.

<!-- TODO: too long. move this part below to GraphQL page
<!-- TODO: too long. move this part below to GraphQL page
Our GraphQL feature allows GraphQL users to get started immediately - simply define a schema and Dgraph automatically builds out CRUD and query APIs. Dgraph works as a standards-compliant GraphQL server, so many web and app developers may not know (or care) that Dgraph is a powerful graph database as well.

As a native GraphQL database, Dgraph doesn’t have a relational database running in the background, or complex resolvers to map between database and GraphQL schemas. We often call this "single-schema development." The big time savings is that there are no GraphQL resolvers or custom queries needed to get started. All GraphQL fields are "resolved" simply by following our graph database edges to required fields. With single-schema development, you can change your GraphQL schema, insert data, and call your new APIs in seconds, not hours.

If you are a SQL user, check out:

[Dgraph for SQL Users](https://dgraph.io/learn/courses/datamodel/sql-to-dgraph/overview/introduction/).
[Dgraph for SQL Users](https://dgraph.io/learn/courses/datamodel/sql-to-dgraph/overview/introduction/).

Read more about the motivations for GraphQL and how Facebook still uses it to provide generic yet efficient data access in [the original annoucement of the spec from Facebook](https://engineering.fb.com/2015/09/14/core-data/graphql-a-data-query-language/).
-->
## The Graph Model - Nodes, Relationships and Values
Expand All @@ -63,11 +63,11 @@ This JSON structure succinctly represents rich data:
- **Facet** metadata: the Address relation is qualified with a property specifying the Address relationship started on February 20, 2022.
-->

Dgraph supports [JSON]({{< relref "mutations/json-mutation-format" >}}) data as both a return structure and an insert/update format. In Dgraph JSON nesting represents relations among nodes, so `{ "name":"Bob", "homeAddress": { "Street":"123 Main st" } }` efficiently and intuitively represents a Person node, an Address node, and a relation (called "homeAddress") between them.
Dgraph supports [JSON]({{< relref "json-mutation-format.md" >}}) data as both a return structure and an insert/update format. In Dgraph JSON nesting represents relations among nodes, so `{ "name":"Bob", "homeAddress": { "Street":"123 Main st" } }` efficiently and intuitively represents a Person node, an Address node, and a relation (called "homeAddress") between them.

In addition, Dgraph supports [RDF triples]({{< relref "mutations/triples/" >}}) as an input and outpup format.
In addition, Dgraph supports [RDF triples]({{< relref "dql-rdf.md" >}}) as an input and outpup format.

Dgraph relationships are directed links between nodes, allowing optimized traversal from node to node. Dgraph allows a bidirectional relation via directed relationships in both directions if desired.
Dgraph relationships are directed links between nodes, allowing optimized traversal from node to node. Dgraph allows a bidirectional relation via directed relationships in both directions if desired.

## Application developers and data engineers work together seamlessly
Dgraph allows a particularly smoooth interaction among data teams or experts and data consumers. GraphQL's flexibility empowers data consumers to get exactly the data they want, in the format they want it, at the speed they need, without writing custom REST APIs or understanding a new graph query language.
Expand All @@ -78,11 +78,11 @@ Database experts can focus on the data, schema and indexes, without maintaining

- **Shared Instance**: Dgraph Cloud with [shared instances](https://dgraph.io/graphql) is a
fully-managed graph database service that lets you focus on building apps, not
managing infrastructure. This is a fast and easy way to get started with GraphQL, and does not require any graph database knowledge to start and run.
managing infrastructure. This is a fast and easy way to get started with GraphQL, and does not require any graph database knowledge to start and run.

Shared instances run in a common database using Dgraph multi-tenancy. Your data is protected but you share resources and will have limited scale.

Try the [Introduction to GraphQL](https://dgraph.io/tour/graphqlintro/2/) tutorial to define a GraphQL schema, insert and query data in just a few minutes.
Try the [Introduction to GraphQL](https://dgraph.io/tour/graphqlintro/2/) tutorial to define a GraphQL schema, insert and query data in just a few minutes.

- **Dedicated instances** run on their own dedicated hardware to ensure consistent performance. This option extends the capabilities of the lower-cost shared instances to support enterprise, production workloads, and includes a high availability option.

Expand All @@ -101,7 +101,7 @@ In addition, people use common tools to define schemas, load data, and query the

- **Ratel** Ratel is a GUI app from Dgraph that runs DQL queries and mutations, and allows schema viewing and editing (as well as some cluster management operations).

- **Dgraph lambdas**: A Dgraph lambda is a data function written in JavaScript that can augment results of a query. Lambdas implement database triggers and custom GraphQL resolvers, and run in an optional node.js server (included in any cloud deployment).
- **Dgraph lambdas**: A Dgraph lambda is a data function written in JavaScript that can augment results of a query. Lambdas implement database triggers and custom GraphQL resolvers, and run in an optional node.js server (included in any cloud deployment).

### Scale, replication and sharding
Every cluster will have at least one Dgraph Zero node and one Dgraph Alpha node. Then databases are expanded in two ways.
Expand All @@ -114,7 +114,7 @@ Every cluster will have at least one Dgraph Zero node and one Dgraph Alpha node.

## What's Next

- **Get Started** with a [free database instance](https://cloud.dgraph.io)
- **Get Started** with a [free database instance](https://cloud.dgraph.io)
- get familiar with some terms in our [Glossary](/dgraph-glossary)
- Take the [Dgraph tour](https://dgraph.io/tour/)
- Go through some [tutorials]({{< relref "tutorials" >}})
8 changes: 0 additions & 8 deletions content/dql-overview/_index.md

This file was deleted.

144 changes: 0 additions & 144 deletions content/dql-overview/to-sort.md

This file was deleted.

12 changes: 12 additions & 0 deletions content/dql-syntax/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
title = "DQL syntax"
[menu.main]
name = "DQL Syntax"
identifier = "dql-syntax"
parent = "dql"
weight = 2
+++

Dgraph Query Language (DQL) is Dgraph’s proprietary language to add, modify, delete and fetch data.

Fetching data is done through [DQL Queries]({{< relref "dql-query.md" >}}). Adding, modifying or deleting data is done through [DQL Mutations]({{< relref "dql-mutation.md" >}}).
Loading