surrealdb / docs.surrealdb.com

The documentation for SurrealDB, powered by Docusaurus
https://surrealdb.com/docs/
72 stars 113 forks source link

Create statement review #762

Closed Dhghomon closed 3 weeks ago

Dhghomon commented 1 month ago

Review of the entire CREATE statement page. Most of the query statements (CREATE/UPDATE/DELETE and all the rest) are pretty large so will make each one of them into their own PR.

netlify[bot] commented 1 month ago

Deploy Preview for surrealdb-docs ready!

Name Link
Latest commit 7a097c86900a712f1c3fd7ca8126220a1622eb2b
Latest deploy log https://app.netlify.com/sites/surrealdb-docs/deploys/66c7503b7841760008a6b317
Deploy Preview https://deploy-preview-762--surrealdb-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Dhghomon commented 1 month ago

That sounds good, maybe a section of its own on the bottom of this page and a link to it at this point?

2024년 8월 13일 (화) 오후 5:28, Obinna Ekwuno @.***>님이 작성:

@.**** commented on this pull request.

In doc-surrealdb_versioned_docs/version-latest/surrealql/statements/create.mdx https://github.com/surrealdb/docs.surrealdb.com/pull/762#discussion_r1714886551 :


--- Create a new table
-CREATE person
+-- Create a new record

@Dhghomon https://github.com/Dhghomon I wonder if we can add a comment here because the CREATE person will also implicitly create a schemaless table that can be seen in the info for db

— Reply to this email directly, view it on GitHub https://github.com/surrealdb/docs.surrealdb.com/pull/762#pullrequestreview-2234876083, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP2GLYVNNRH6ZBW6EWX2EDZRG7SNAVCNFSM6AAAAABMNNVP66VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMZUHA3TMMBYGM . You are receiving this because you were mentioned.Message ID: @.***>

Dhghomon commented 1 month ago

I thought I would move that one out of the Note section as it seemed a little out of place visually and felt more like a nice fact in a regular paragraph than a warning.

2024년 8월 13일 (화) 오후 5:37, Obinna Ekwuno @.***>님이 작성:

@.**** commented on this pull request.

In doc-surrealdb_versioned_docs/version-latest/surrealql/statements/create.mdx https://github.com/surrealdb/docs.surrealdb.com/pull/762#discussion_r1714898957 :

-When using the create statement the first word after CREATE is the table name. You also specify a record identifier using the : followed by a value. Ex. CREATE Table:this. The two together form the full record ID which can be used to query the created data or by using the SELECT statement. See the record ID page to learn more about what counts as a valid record identifier. If no record identifier is specified, a random identifier will be generated.

-:::note -Note: You can also assign the recordID to be randomly generated -:::

@Dhghomon https://github.com/Dhghomon any reason for deleting this? Can we leave it in as it is an opportunity to introduce the concept of recordIDs which will be seen as the reader tests out the create statement.

— Reply to this email directly, view it on GitHub https://github.com/surrealdb/docs.surrealdb.com/pull/762#pullrequestreview-2234896168, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP2GL3LVVGWMXSR3GZZ3NDZRHAULAVCNFSM6AAAAABMNNVP66VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMZUHA4TMMJWHA . You are receiving this because you were mentioned.Message ID: @.***>