messages listlengths 2 2 | category stringclasses 7
values | task_type stringclasses 4
values | source stringlengths 15 77 |
|---|---|---|---|
[
{
"content": "Explain the following topic about SurrealDB: `BoundQuery<R>` {#boundquery}",
"role": "user"
},
{
"content": "# `BoundQuery<R>` {#boundquery}\n\nThe `BoundQuery` class represents a parameterized SurrealQL query with bound variables, providing safe query composition and preventing SQL in... | index | qa | index/languages/javascript/api/utilities/bound-query.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Import command",
"role": "user"
},
{
"content": "information.\n\n## Using environment variables\n\nWhen using the `surreal import` command, you can also use environment variables to set the values for the command-line flags. \n\n>[!IMPORTANT... | reference | qa | reference/cli/surrealdb-cli/commands/import.mdx |
[
{
"content": "What is Real-time and event-driven best practices in SurrealDB?",
"role": "user"
},
{
"content": "w() - rand::duration(0ns, 1y)] SET temperature = 9.0;\n };\n\n // 100,000 weather2 records\n FOR $_ IN 0..100000 {\n CREATE weather2 SET \n location = \"London\",\n ... | learn | concept_explanation | learn/querying/real-time/real-time-best-practices.md |
[
{
"content": "How do I use SurrealDB from code? Topic: The `surrealdb-types` crate\n\nContext:\n# The `surrealdb-types` crate\n\nThe largest user experience improvement for Rust users of SurrealDB 3.0 is the surrealdb-types crate, which was created to have a shared public value type system for SurrealDB.\n\nThi... | index | sdk_usage | index/languages/rust/concepts/rust-after-3.0.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: Quickstart\n\nContext:\n# Quickstart\n\nThe Java SDK for SurrealDB makes it straightforward to connect to your instance and start querying data. This guide walks you through connecting, authenticating, and performing basic operations.\n\n## 1. Install the S... | index | sdk_usage | index/languages/java/start.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Data manipulation",
"role": "user"
},
{
"content": "# Data manipulation\n\nThe Java SDK provides dedicated methods for common CRUD operations on records and tables. These methods offer a structured alternative to writing raw SurrealQL, with ... | index | qa | index/languages/java/concepts/data-manipulation.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `Query<R, J>` {#query}",
"role": "user"
},
{
"content": "Processing\"\nfor await (const frame of db.query('SELECT * FROM users').stream()) {\n if (frame.type === 'value') {\n console.log('Received data:', frame.value);\n } else ... | index | qa | index/languages/javascript/api/queries/query.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Import command",
"role": "user"
},
{
"content": "es: --db]\n -h, --help Print help\n\nLogging:\n -l, --log <LOG> The logging level for the command-line tool [env: SURREAL_LOG=] [default: inf... | reference | qa | reference/cli/surrealdb-cli/commands/import.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: `DB` {#db}\n\nContext:\nThese are top-level generic functions that accept `*DB`, `*Session`, or `*Transaction` as the `s` parameter.\n\n### `Select` {#select}\n\nRetrieves records from the database.\n\n```go title=\"Syntax\"\nresult, err := surrealdb.Select... | index | sdk_usage | index/languages/golang/api/core/db.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Built-in functions",
"role": "user"
},
{
"content": "# Built-in functions\n\nBesides basic JavaScript utilities and classes for SurrealQL types, there are a handful of utilities built into the embedded scripting functions.\n\n<table>\n <the... | reference | qa | reference/query-language/scripting/built-in-functions.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `DB` {#db}",
"role": "user"
},
{
"content": "`\n\n**Returns:** `(*Transaction, error)` — see `Transaction`\n\n---\n\n## Query functions\n\nThese are top-level generic functions that accept `*DB`, `*Session`, or `*Transaction` as the `s` para... | index | qa | index/languages/golang/api/core/db.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about Count function.\n\nContext:\n# Count function\n\nThis function can be used when counting field values and expressions.\n\n<table>\n <thead>\n <tr>\n <th scope=\"col\">Function</th>\n <th scope=\"col\">Description</th>\n </t... | reference | query_generation | reference/query-language/functions/database-functions/count.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Fields and validation",
"role": "user"
},
{
"content": "YS` keyword indicates that the `DEFAULT` clause is used not only on `CREATE`, but also on `UPDATE` if the value is empty (NONE).\n\n```surql\nDEFINE TABLE product SCHEMAFULL;\n-- Set a ... | learn | qa | learn/schema-management/tables-and-fields/fields-and-validation.md |
[
{
"content": "Write a SurrealQL query based on this documentation about Serverless vs. traditional.\n\nContext:\nInstead of long-lived processes with persistent connections, serverless and edge code runs in short-lived, stateless executions, often across multiple regions.\n\nSome examples of environments in whi... | learn | query_generation | learn/querying/concepts-and-guides/connecting-from-serverless-and-edge.md |
[
{
"content": "Explain the following topic about SurrealDB: Rust SDK",
"role": "user"
},
{
"content": "# Rust SDK\n\nThe SurrealDB SDK for Rust enables you to interact with SurrealDB from client-side, server-side applications, systems, APIs, embedded systems, and IOT devices. The Rust SDK has support... | index | qa | index/languages/rust/overview.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `Response` {#response}",
"role": "user"
},
{
"content": "# `Response` {#response}\n\nThe `Response` class wraps the results returned by a SurrealQL query execution. A single query string can contain multiple statements, and the `Response` ho... | index | qa | index/languages/java/api/core/response.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Geo functions",
"role": "user"
},
{
"content": "of an array to allow for more complex types such as MultiPolygon.\n\n```surql\n\nRETURN geo::area({\n type: \"Polygon\",\n coordinates: [[\n [-111.0690, 45.0032],\n [-104.0838, 44.9893]... | reference | qa | reference/query-language/functions/database-functions/geo.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: Error handling\n\nContext:\nere you want to ensure no SDK error goes unhandled.\n\n## Handling server errors\n\nServer errors carry structured information beyond the error message. A `ServerError` has a `.kind` string, an optional `.details` dictionary, and... | index | sdk_usage | index/languages/python/concepts/error-handling.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about `SELECT` statement.\n\nContext:\nate over the whole table.\n\n```surql\n\nCREATE person:tobie SET\n\tname = \"Tobie\",\n\taddress = \"1 Bagshot Row\",\n\temail = \"tobie@surrealdb.com\";\n\nSELECT * FROM person WHERE email='tobie@surrealdb.... | reference | query_generation | reference/query-language/statements/select.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Data manipulation",
"role": "user"
},
{
"content": "# Data manipulation\n\nThe Python SDK provides dedicated methods for common CRUD operations on records and tables. These methods offer a structured alternative to writing raw SurrealQL, wit... | index | qa | index/languages/python/concepts/data-manipulation.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `Surreal` {#surreal}",
"role": "user"
},
{
"content": "delete(RecordId recordId)\nvoid delete(RecordId... recordIds)\nvoid delete(RecordIdRange range)\nvoid delete(String target)\n```\n\n<table>\n <thead>\n <tr>\n <th>Pa... | index | qa | index/languages/java/api/core/surreal.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about `DEFINE CONFIG` statement.\n\nContext:\nables to include in the GraphQL schema.\n- `EXCLUDE`: Specify a list of tables to exclude from the GraphQL schema.\n\n#### `AUTO`\n\nWhen you specify `TABLES AUTO`, all tables in the database are auto... | reference | query_generation | reference/query-language/statements/define/config.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Deploy on Amazon Elastic Kubernetes Service (EKS)",
"role": "user"
},
{
"content": "delete -f tidb-cluster.yaml -n tidb-cluster\nhelm uninstall surrealdb-tikv\nhelm -n kube-system uninstall aws-load-balancer-controller\nhelm -n tidb-admin un... | build | qa | build/deployment/self-hosted/amazon-eks.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Manage database access",
"role": "user"
},
{
"content": "# Manage database access\n\nThe Authentication view allows you to control account access to the database. This includes system users (root, namespace, and database) as well as scope ac... | explore | qa | explore/surrealist/concepts/managing-database-access.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about Vector indexes.\n\nContext:\nomatically calculated with a value considered as optimal.\n\nExamples:\n\n```surql\n-- User statement:\nDEFINE INDEX hnsw_idx ON pts FIELDS point HNSW DIMENSION 4;\n-- Defaults to:\nDEFINE INDEX hnsw_idx ON pts ... | learn | query_generation | learn/data-models/vector-search/vector-indexes.md |
[
{
"content": "Explain the following topic about SurrealDB: `DEFINE FIELD` statement",
"role": "user"
},
{
"content": "from: int, to: int }\n | { type: \"Snowball\", language: string }\n | { type: \"Uppercase\" };\n```\n\n## Defining a `TYPE` for the `id` field\n\nThe `DEFINE FIELD` statement c... | reference | qa | reference/query-language/statements/define/field.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Performance best practices",
"role": "user"
},
{
"content": "0;\n-- Boolean check: even faster\nSELECT * FROM person WHERE is_short;\n-- Direct record access: almost instantaneous\nSELECT * FROM person:one;\n```\n\n## Using indexes\n\nSurrea... | learn | qa | learn/querying/performance/performance-best-practices.md |
[
{
"content": "Explain the following topic about SurrealDB: Scaling",
"role": "user"
},
{
"content": "# Scaling\n\nThis page describes **operational scaling** for SurrealDB Cloud: changing instance size, adding read capacity, and using observability data to time changes safely.\n\n## Resizing instanc... | build | qa | build/deployment/surrealdb-cloud/operations/scaling.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Fields and validation",
"role": "user"
},
{
"content": "howing the possible distinct directions a character can move next.\n-- The array can contain no more than four directions\nDEFINE FIELD next_paths ON TABLE block \n TYPE array<\"north\... | learn | qa | learn/schema-management/tables-and-fields/fields-and-validation.md |
[
{
"content": "Write a SurrealQL query based on this documentation about Object functions.\n\nContext:\nthe two together.\n\n```surql title=\"API DEFINITION\"\nobject::extend(object, $other: object) -> object\n```\n\nAn example of the function, resulting in one new field (`gold`) and one updated field (`last_upd... | reference | query_generation | reference/query-language/functions/database-functions/object.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `ALTER EVENT` statement",
"role": "user"
},
{
"content": "# `ALTER EVENT` statement\n\nThe `ALTER EVENT` statement can be used to modify an existing defined event.\n\n## Statement syntax\n\n## Example usage\n\n```surql\nDEFINE FIELD status O... | reference | qa | reference/query-language/statements/alter/event.mdx |
[
{
"content": "What is Security in SurrealDB?",
"role": "user"
},
{
"content": "# Security\n\nSurrealDB provides a layered security model that covers how users and systems prove their identity, what they are allowed to do once authenticated, and the operational practices that keep a deployment safe.\... | learn | concept_explanation | learn/security/index.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about Defining parameters within SurrealQL.\n\nContext:\ntypes when the query is run. The following example show a variable being used within a SurrealQL query from the JavaScript library.\n\n```javascript\nlet people = await surreal.query(\"SELE... | learn | query_generation | learn/querying/concepts-and-guides/parameterised-queries.md |
[
{
"content": "Explain the following topic about SurrealDB: Using SurrealDB as a full text search database",
"role": "user"
},
{
"content": "# Using SurrealDB as a full text search database\n\nA full-text search database is designed to index and retrieve text-based data (like articles, messages, or c... | learn | qa | learn/data-models/full-text-search/overview.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: `DB` {#db}\n\nContext:\n<th>Type</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code>ctx</code> </td>\n <td><code>context.Context</code></td>\n <td>Context for the opera... | index | sdk_usage | index/languages/golang/api/core/db.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: Embedding in Rust\n\nContext:\ne>\n \n </td>\n <td colspan=\"2\" scope=\"row\" data-label=\"Description\">\n Assigns variables which can be used in the query.\n </td>\n </tr>\n </tbody>... | index | sdk_usage | index/languages/rust/embedding.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about `DEFINE FIELD` statement.\n\nContext:\nthe result will be the new value.\n\nIn the case of `NULL` or a mismatching type, an error will be returned.\n\n```surql\n-- This will return an error\nCREATE product:test SET primary = NULL;\n\n-- res... | reference | query_generation | reference/query-language/statements/define/field.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: Errors\n\nContext:\nalidationError` {#validationerror}\n\n**Extends:** `ServerError`\n\nValidation failure such as parse errors, invalid request parameters, or bad input.\n\n**Properties:**\n\n| Property | Type | Description |\n|----------|------|----------... | index | sdk_usage | index/languages/python/api/errors/index.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Authentication",
"role": "user"
},
{
"content": "e value of the `Origin` header of the HTTP request.\n - This header is usually set by browsers to identify the site that originated the request.\n- `id`: The value of the `surreal-id` header ... | learn | qa | learn/security/authentication/authentication.mdx |
[
{
"content": "Explain the following topic about SurrealDB: SQL command",
"role": "user"
},
{
"content": "Sets whether omitting semicolon causes a newline \n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n `-h` / `--help`\n \n </... | reference | qa | reference/cli/surrealdb-cli/commands/sql.mdx |
[
{
"content": "Explain the following topic about SurrealDB: RPC protocol",
"role": "user"
},
{
"content": "/tr>\n <tr>\n <td scope=\"row\" data-label=\"Function\"><a href=\"#patch\"><code>patch [ thing, patches, diff ]</code></a></td>\n <td scope=\"row\" data-label=\"Desc... | reference | qa | reference/rest-api/rpc-protocol.mdx |
[
{
"content": "Explain the following topic about SurrealDB: IoT and telemetry patterns",
"role": "user"
},
{
"content": "# IoT and telemetry patterns\n\n## Modelling time series data in SurrealDB\n\nLet’s explore a practical example using IoT sensor data.\n\n### Modelling events\n\nThe normal way of ... | learn | qa | learn/data-models/time-series/iot-and-telemetry-patterns.md |
[
{
"content": "Explain the following topic about SurrealDB: Geometries",
"role": "user"
},
{
"content": "es\": {\"lon\": -79.28215, \"lat\": 43.75386}}]\n\n{\n CREATE type::record(\"city\", <int>$city.geoname_id) SET\n\t\tlocation = <point>[$city.coordinates.lon, $city.coordinates.lat],\n\t\tname ... | reference | qa | reference/query-language/language-primitives/data-types/geometries.mdx |
[
{
"content": "What is Sample schemas by industry in SurrealDB?",
"role": "user"
},
{
"content": "G game system with character progression, inventory management, and quest tracking. Features polymorphic item effects, character statistics, and complex game state management. Demonstrates flexible data ... | learn | concept_explanation | learn/schema-management/schema-design/sample-industry-schemas.md |
[
{
"content": "Explain the following topic about SurrealDB: Operators",
"role": "user"
},
{
"content": "code>\n\t\t\t\t</a>\n\t\t\t</td>\n\t\t\t<td scope=\"row\" data-label=\"Description\">\n\t\t\t\tCheck whether any value in a set is equal to a value\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td scop... | reference | qa | reference/query-language/language-primitives/operators.mdx |
[
{
"content": "What is Buckets in SurrealDB?",
"role": "user"
},
{
"content": "al bucket.\n\nIf a global backend is set, then a `DEFINE BUCKET` statement can be as short as `DEFINE BUCKET` plus its local name, as the rest of the logic is done via environment variables.\n\n```surql\nDEFINE BUCKET my_b... | learn | concept_explanation | learn/schema-management/files/buckets.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `REBUILD` statement",
"role": "user"
},
{
"content": "# `REBUILD` statement\n\nThe `REBUILD` statement is used to rebuild indexes in SurrealDB. It is usually used in relation to a specified Index to optimize performance. It is useful to rebu... | reference | qa | reference/query-language/statements/rebuild.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Data Types",
"role": "user"
},
{
"content": "### Working with a `RecordId`\n\n```php title=\"Constructing\"\n// table is \"person\"\n// unique identifier on the table is \"john\"\n$rid = new RecordId(\"person\", \"john\");\n```\n\n```php tit... | index | qa | index/languages/php/data-types.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about Operators.\n\nContext:\n\" data-label=\"Description\">\n\t\t\t\tChecks whether the terms are found in a full-text indexed\n\t\t\t\tfield\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td scope=\"row\" data-label=\"Operator\">\n\t\t\t\t<div class... | reference | query_generation | reference/query-language/language-primitives/operators.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about `FOR` statement.\n\nContext:\n# `FOR` statement\n\nThe `FOR` statement can be used to iterate over the values of an array, and to perform certain actions with those values.\n\n> [!NOTE]\n> A `FOR` loop currently cannot modify items outside ... | reference | query_generation | reference/query-language/statements/for.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `RecordId<Tb, Id>` {#recordid}",
"role": "user"
},
{
"content": "ng</code></td>\n <td>The record ID string (format: <code>table:id</code>).</td>\n </tr>\n </tbody>\n</table>\n\n#### Returns\n`RecordId` - The parsed recor... | index | qa | index/languages/javascript/api/values/record-id.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `DEFINE ACCESS ... TYPE JWT`",
"role": "user"
},
{
"content": "# `DEFINE ACCESS ... TYPE JWT`\n\nA JWT access method allows accessing SurrealDB with a token signed by a trusted issuer. The contents of the token will be trusted by SurrealDB a... | reference | qa | reference/query-language/statements/define/access/jwt.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Creating custom modules",
"role": "user"
},
{
"content": "# Creating custom modules\n\nThis guide walks you through building a Surrealism module from scratch: a Rust crate annotated for SurrealDB, compiled to WebAssembly, then registered in ... | learn | qa | learn/extensions/guides/creating-custom-modules.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Realtime data streaming",
"role": "user"
},
{
"content": "<th colspan=\"2\" scope=\"col\">Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td colspan=\"1\" scope=\"row\" data-label=\"Action\">\n ... | index | qa | index/languages/dotnet/core/streaming.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Upgrading from `2.x` to `3.x`",
"role": "user"
},
{
"content": "=\"row\" data-label=\"Previous name\"><code>type::is::array</code></td>\n </tr>\n <tr>\n <td scope=\"row\" data-label=\"New function name\"><code>type::... | build | qa | build/migrating/from-old-surrealdb-versions/2x-to-3x.mdx |
[
{
"content": "What is Using SurrealDB as a vector database in SurrealDB?",
"role": "user"
},
{
"content": "Natural Language Processing (NLP), a word or sentence can be transformed into a vector of length 128, 256, 768, or even more dimensions. The idea is that similar objects (in meaning) end up hav... | learn | concept_explanation | learn/data-models/vector-search/vector-overview.md |
[
{
"content": "Write a SurrealQL query based on this documentation about HTTP & REST.\n\nContext:\nth>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td colspan=\"2\" scope=\"row\" data-label=\"Header\">\n <code>Authorization</code>\n <label label=\"optional\"... | reference | query_generation | reference/rest-api/http-protocol.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: `Range` {#range}\n\nContext:\n# `Range` {#range}\n\nThe `Range` generic struct represents a SurrealDB range value with configurable bound types. Ranges can have inclusive or exclusive bounds on either end.\n\n**Package:** `github.com/surrealdb/surrealdb.go/... | index | sdk_usage | index/languages/golang/api/values/range.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about Sequences.\n\nContext:\n# Sequences\n\nSometimes you need a monotonic number: an order line, a ticket counter, or an audit sequence that always moves forward and never hands the same value to two different writers. Sequences are SurrealDB's... | learn | query_generation | learn/querying/concepts-and-guides/sequences.md |
[
{
"content": "Write a SurrealQL query based on this documentation about `DEFINE INDEX` statement.\n\nContext:\n> [!NOTE]\n> Before SurrealDB version 3.0.0-beta, the `FULLTEXT ANALYZER` clause used the syntax `SEARCH ANALYZER`.\n\n# `DEFINE INDEX` statement\n\nJust like in other databases, SurrealDB uses indexes... | reference | query_generation | reference/query-language/statements/define/indexes.mdx |
[
{
"content": "Explain the following topic about SurrealDB: HTTP & REST",
"role": "user"
},
{
"content": "abel=\"optional\">OPTIONAL</label>\n </td>\n <td colspan=\"2\" scope=\"row\" data-label=\"Description\">\n Sets the root, namespace, database, or record authentic... | reference | qa | reference/rest-api/http-protocol.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `SurrealSession` {#surrealsession}",
"role": "user"
},
{
"content": "bscribe()` {#subscribe}\n\nSubscribe to session events.\n\n```ts title=\"Method Syntax\"\nsession.subscribe(event, listener)\n```\n\n#### Parameters\n<table>\n <thead>\n... | index | qa | index/languages/javascript/api/core/surreal-session.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `Geometry` {#geometry}",
"role": "user"
},
{
"content": "# `Geometry` {#geometry}\n\nThe `Geometry` class represents SurrealDB geometric data types. It currently supports point geometry, mapping to Java's `Point2D.Double` from `java.awt.geom... | index | qa | index/languages/java/api/values/geometry.mdx |
[
{
"content": "Explain the following topic about SurrealDB: `USE` statement",
"role": "user"
},
{
"content": "# `USE` statement\n\nThe `USE` statement specifies a namespace and / or a database to use for the subsequent SurrealQL statements when switching between namespaces and databases. If you have ... | reference | qa | reference/query-language/statements/use.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Connect to SurrealDB via ngrok tunnel",
"role": "user"
},
{
"content": "# Connect to SurrealDB via ngrok tunnel\n\nThis guide will walk you through connecting a local SurrealDB instance to the internet using Ngrok, making it accessible remot... | explore | qa | explore/tutorials/tutorials/connect-via-ngrok.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Migrating from MongoDB to SurrealDB",
"role": "user"
},
{
"content": "pression\": {\"pattern\": \"...\", \"options\": \"...\"}}` | `regex` |\n| **DBPointer** | DbPointer ... | build | qa | build/migrating/from-other-databases/from-mongodb.md |
[
{
"content": "Write a SurrealQL query based on this documentation about `REBUILD` statement.\n\nContext:\n# `REBUILD` statement\n\nThe `REBUILD` statement is used to rebuild indexes in SurrealDB. It is usually used in relation to a specified Index to optimize performance. It is useful to rebuild indexes because... | reference | query_generation | reference/query-language/statements/rebuild.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Performance best practices",
"role": "user"
},
{
"content": "# Performance best practices\n\nTo achieve the best performance from SurrealDB, there are a number of configuration options and runtime design choices to consider. The following is... | learn | qa | learn/querying/performance/performance-best-practices.md |
[
{
"content": "Write a SurrealQL query based on this documentation about `GROUP` clause.\n\nContext:\n# `GROUP` clause\n\nThe `GROUP` clause is used to aggregate data based on one or more fields. It is particularly useful when you want to perform calculations on groups of data, such as counting the number of rec... | reference | query_generation | reference/query-language/clauses/group.mdx |
[
{
"content": "What is Tips and best practices for record IDs in SurrealDB?",
"role": "user"
},
{
"content": "## Tips and best practices for record IDs\n\nThis page contains a number of tips and best practices when working with record IDs in SurrealDB.\n\n### Why choose the right record ID format\n\n... | learn | concept_explanation | learn/schema-management/tables-and-fields/record-id-best-practices.md |
[
{
"content": "Explain the following topic about SurrealDB: `Surreal` {#surreal}",
"role": "user"
},
{
"content": "l</code></td>\n <td>The record access credentials including namespace, database, access method, and any additional fields required by the access definition.</td>\n </tr... | index | qa | index/languages/java/api/core/surreal.mdx |
[
{
"content": "What is Using SurrealDB as a time series database (TSDB) in SurrealDB?",
"role": "user"
},
{
"content": "urql\n-- Trigger the event on when a record is created\nDEFINE EVENT sensor_anomaly_notification ON sensor_readings WHEN $event = 'CREATE'\nTHEN {\n -- Get the desired time range... | learn | concept_explanation | learn/data-models/time-series/using-as-time-series-database.md |
[
{
"content": "Explain the following topic about SurrealDB: String functions",
"role": "user"
},
{
"content": "ng::is_datetime()</code></a></td>\n <td>Checks whether a string representation of a date and time matches a specified format</td>\n </tr>\n <tr>\n <td><a href=\"#stringis_dom... | reference | qa | reference/query-language/functions/database-functions/string.mdx |
[
{
"content": "Write a SurrealQL query based on this documentation about `DEFINE TOKEN` statement.\n\nContext:\n> [!WARNING]\n> This statement was deprecated in favour of `DEFINE ACCESS ... TYPE JWT` and `DEFINE ACCESS ... TYPE RECORD ... WITH JWT` in SurrealDB versions 2.x, and has been removed as of SurrealDB ... | reference | query_generation | reference/query-language/statements/define/token.mdx |
[
{
"content": "How do I use SurrealDB from code? Topic: `AsyncSurrealTransaction` / `BlockingSurrealTransaction` {#surreal-transaction}\n\nContext:\n{#commit}\n\nCommits the transaction, applying all changes made within it to the database. After committing, the transaction object should not be used.\n\n```python... | index | sdk_usage | index/languages/python/api/core/surreal-transaction.mdx |
[
{
"content": "What is Sample schemas by industry in SurrealDB?",
"role": "user"
},
{
"content": "0 or < 0\nDEFINE EVENT update_cents ON account WHEN $event = \"UPDATE\" THEN {\n IF cent > 99 {\n UPDATE $after SET cent -= 100, amount += 1;\n } ELSE IF cent < 0 {\n UPDATE $after SE... | learn | concept_explanation | learn/schema-management/schema-design/sample-industry-schemas.md |
[
{
"content": "Write a SurrealQL query based on this documentation about Session functions.\n\nContext:\n# Session functions\n\nThese functions return information about the current SurrealDB session.\n\n<table>\n <thead>\n <tr>\n <th scope=\"col\">Function</th>\n <th scope=\"col\">Description</th>\... | reference | query_generation | reference/query-language/functions/database-functions/session.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Embedding in Rust",
"role": "user"
},
{
"content": "# Embedding in Rust\n\nSurrealDB is designed to be run in many different ways and in many environments. Due to the separation of the storage and API layers, SurrealDB can be run in embedded... | index | qa | index/languages/rust/embedding.mdx |
[
{
"content": "Explain the following topic about SurrealDB: Escape functions {#escape}",
"role": "user"
},
{
"content": "d names\n- Working with identifiers that have special characters\n- Building dynamic schema definitions\n- Interfacing with external query builders\n\n### ❌ prefer other solutions:... | index | qa | index/languages/javascript/api/utilities/escape.mdx |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 35