SurrealDB - getting started | Rust Language

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 มิ.ย. 2024
  • SurrealDB - Day 1 - I show some of the examples, how to use thunderclient in VSCode and surrealist.app to make queries and insert data. This video shows you how to get your hands dirty, and aims to be the "TLDR" for getting started with SurrealDB. surrealdb.com/
    I also show the Rust code to use with SurrealDB (from the SurrealDB examples)
    - chapters -
    00:00 intro
    02:16 thunderclient examples
    08:00 persist data
    08:40 Rust code
    🟩 redandgreen.co.uk/learn-surre...
    🦀 SurrealDB Rust Playlist
    • SurrealDB + Rust Examples
    install SurrealDB
    ---------------------------
    🟩 surrealdb.com/install
    start the server
    -------------------------
    surreal start --log info --user root --pass root file:mydatabase.db
    Test code:
    ------------------
    CREATE human:Bob SET age=27, nickname='Bob';
    CREATE human:Pete SET age=39, nickname='Pete';
    SELECT math::sum(age) from human GROUP ALL;
    Demo Data
    🟩 surrealdb.com/docs/surrealdb/...
    Linux Hosting - VPS server - Webdock
    ----------------------------------------------------------------
    🟩 Webdock Linux Hosting : webdock.io/en?maff=wdaff--170
    Nostr
    ---------
    @RngWeb
    findthatbit@iris.to
    findthatbit.info/
    redandgreen.co.uk/
    #rustlang #SurrealDB #learningrust

ความคิดเห็น • 2

  • @jaymartinez311
    @jaymartinez311 2 หลายเดือนก่อน +1

    Random question.
    I saw the documentation to intergrate surrealdb by way of sdk with like a dotnet web api and it seemed like it eliminated the code for crud methods in a web api project, since it has built in functions that does that pretty efficiently and can be called directly vs using the frameworks methods. I’m confused if that’s on purpose or just an option? Also calling the entities directly like that when i’m use to using dtos to abstract the entities direct access and stuff.
    i know i could just create my own crud functions and wrap them around the surrealdb provided functions for more clarity but just confused a bit since surrealql is new but so simple to understand. I’m figuring some form of serialization must be done to not require dtos. I know this is a rust channel but this is more of a general backend question. Sorry for the long winded question.

    • @learning_rust
      @learning_rust  2 หลายเดือนก่อน +1

      Good question(s). To quote their docs "SurrealDB is designed to be run in many different ways, and environments. Due to the separation of the storage and API layers,"
      So yes, seems like the built in functions eg the HTTP functions may be all you need, (JSON). As for creating your own CRUD functions, it seems like this is for where you want to run in embedded mode, eg incorporating in in memory database with your own project and this is where you need to deserialize the response, which is a bit more work. I'm fairly new to this also but am going to delve deeper. Thanks for the comment by the way!