rust database for you to use and help me make!

Overview

Welcome To Rust Database!

What is this?

this is a database for you to git clone and use in your project!

Why should i use it?

It is fast and it takes 2ms to return data. Also if you want to local store data on your pc of your users then you may want to use it.

Start the online database

use rust_store;

fn main() {
    rust_store::StateData {
        api_key: "your_api_key".to_string(),
        // make sure to change this to some key!
        // change this if your want but otherwise don't
        null: "null_nil_value_key:345n,234lj52".to_string(),
        // make sure this file exists or the code will not work!
        data_storage_location: "database/".to_string(),
    }
    .start_database_online()
}

What requests can you do?

=> GET / (index)
=> GET /read/<path>/<api_key> (read)
=> GET /add/<path>/<data_name>/<data>/<api_key> (add)
=> GET /delete/<path>/<api_key> (delete)
=> GET /null_write/<path>/<api_key> (null_write)

How can you use it?

USE RUST NIGHTLY!!!!!!!

use ` instead of / to navgate directories.

This request will add data at ${your_database_folder}/test/worked data.txt. The data.txt will have "this is going very well" stored.

http://localhost:8000/add/test`worked/data/this is going very well/your_api_key

This request will delete at ${your_database_folder}/test/worked data.txt.

http://localhost:8000/delete/test`worked`data/your_api_key

This request will read data at ${your_database_folder}/test/worked data.txt.

http://localhost:8000/read/test`worked`data/your_api_key

This request will write null at ${your_database_folder}/test/worked data.txt.

http://localhost:8000/null_write/test`worked`data/your_api_key

Info on api

http://localhost:8000/

Local Host Functions

To use this you don't need to start the database.

To write

use rust_store;

fn main(){
    let func = rust_store::StateData {
            api_key: "your_api_key".to_string(),
            null: "null_nil_value_key:345n,234lj52".to_string(),
            data_storage_location: "database/".to_string(),
        };
        func.write_data("this is going very well", "test/worked/local", "data")
            .expect("failed when writing data");
}

To read

use rust_store;

fn main(){
     let func = rust_store::StateData {
            api_key: "your_api_key".to_string(),
            null: "null_nil_value_key:345n,234lj52".to_string(),
            data_storage_location: "database/".to_string(),
        };
        let check_data = func
            .read_data("test/worked/local/data")
            .expect("failed when reading");
}

To Delete

use rust_store;

fn main(){
     let func = rust_store::StateData {
            api_key: "your_api_key".to_string(),
            null: "null_nil_value_key:345n,234lj52".to_string(),
            data_storage_location: "database/".to_string(),
        };
        func.delete_data("test/worked/local/data")
            .expect("delete failed");
}

To write null

use rust_store;

fn main(){
     let func = rust_store::StateData {
            api_key: "your_api_key".to_string(),
            null: "null_nil_value_key:345n,234lj52".to_string(),
            data_storage_location: "database/".to_string(),
        };
        func.null_write("test/worked/local/data")
            .expect("write null functions failed");
}

Questions?

How Does this database write data?

This database uses txt instead of csv or json because txt is the fastest way to read and write data.

How Does it organize data?

This database uses a directory way just like you would do on a computer. This storage method automatically make files for you too!

How Does it read data?

This database requires your to put a directory (if you want to use a "/" use a "`" instead) and it return txt value by reading it line by line (a vec value).

How does this database value handle null?

This database has a write null feature to write a null key. If the null key is read when your read a txt it returns

{
    "data" : "null"
    "error" : "data is null"
}

make sure to handle error and check if error value equals "Success".

Error Handling?

If the database work just as planned it returns

{
    "error" : "Success"
}

otherwise it shows the error it received like this.

{
    "error" : "error when writing data"
}

For local functions is returns a Result<(), String> and the errors are the same just make sure to handle the error by matching the string.

Still have questions?

Dm me in discord at Carghai88#1468

Pull Requests?

I will respond as fast as possible just make sure it follows my ideology of speed!

You might also like...
A webring of people who make cool stuff. technology, music, art, writing, anything goes!
A webring of people who make cool stuff. technology, music, art, writing, anything goes!

a webring of people who make cool stuff. technology, music, art, writing, anything goes!

cargo-add command to make dependencies into dylibs

cargo add-dynamic This cargo command allows to wrap dependencies as dylibs. For why you might want this see Speeding up incremental Rust compilation w

Make your IDs strongly typed!!

About TypedId introduces a single type, aptly named TypedId. This is a generic wrapper any type, often types that you would use as an identifier. Howe

A typed map which can make sure item exist.

Certain Map A typed map which can make sure item exist. What Problem Does It Solve In Rust, we often use Service abstraction for modular structure des

Aim is to make PCBoard clone that's finished on PCboards 100th birthday
Aim is to make PCBoard clone that's finished on PCboards 100th birthday

icy_board Aim is to make PCBoard clone that's finished on PCboards 100th birthday - for sure it'll take much time. I've started to port a PPL decompil

Build database expression type checker and vectorized runtime executor in type-safe Rust

Typed Type Exercise in Rust Build database expression type checker and vectorized runtime executor in type-safe Rust. This project is highly inspired

An AI-native lightweight, reliable, and high performance open-source vector database.
An AI-native lightweight, reliable, and high performance open-source vector database.

What is OasysDB? OasysDB is a vector database that can be used to store and query high-dimensional vectors. Our goal is to make OasysDB fast and easy

A small in-memory key value database for rust

SmollDB Small in-memory key value database for rust This is a small in-memory key-value database, which can be easly backed up in a file or stream and

Vemcache is an in-memory vector database.

Vemcache Vemcache is an in-memory vector database. Vemcache can be thought of as the Redis equivalent for vector databases. Getting Started Prerequisi

Comments
  • Bump tokio from 1.21.1 to 1.23.1

    Bump tokio from 1.21.1 to 1.23.1

    Bumps tokio from 1.21.1 to 1.23.1.

    Release notes

    Sourced from tokio's releases.

    Tokio v1.23.1

    This release forward ports changes from 1.18.4.

    Fixed

    • net: fix Windows named pipe server builder to maintain option when toggling pipe mode (#5336).

    #5336: tokio-rs/tokio#5336

    Tokio v1.23.0

    Fixed

    • net: fix Windows named pipe connect (#5208)
    • io: support vectored writes for ChildStdin (#5216)
    • io: fix async fn ready() false positive for OS-specific events (#5231)

    Changed

    • runtime: yield_now defers task until after driver poll (#5223)
    • runtime: reduce amount of codegen needed per spawned task (#5213)
    • windows: replace winapi dependency with windows-sys (#5204)

    #5208: tokio-rs/tokio#5208 #5216: tokio-rs/tokio#5216 #5213: tokio-rs/tokio#5213 #5204: tokio-rs/tokio#5204 #5223: tokio-rs/tokio#5223 #5231: tokio-rs/tokio#5231

    Tokio v1.22.0

    Added

    • runtime: add Handle::runtime_flavor (#5138)
    • sync: add Mutex::blocking_lock_owned (#5130)
    • sync: add Semaphore::MAX_PERMITS (#5144)
    • sync: add merge() to semaphore permits (#4948)
    • sync: add mpsc::WeakUnboundedSender (#5189)

    Added (unstable)

    • process: add Command::process_group (#5114)
    • runtime: export metrics about the blocking thread pool (#5161)
    • task: add task::id() and task::try_id() (#5171)

    Fixed

    • macros: don't take ownership of futures in macros (#5087)
    • runtime: fix Stacked Borrows violation in LocalOwnedTasks (#5099)
    • runtime: mitigate ABA with 32-bit queue indices when possible (#5042)
    • task: wake local tasks to the local queue when woken by the same thread (#5095)
    • time: panic in release mode when mark_pending called illegally (#5093)
    • runtime: fix typo in expect message (#5169)

    ... (truncated)

    Commits
    • 1a997ff chore: prepare Tokio v1.23.1 release
    • a8fe333 Merge branch 'tokio-1.20.x' into tokio-1.23.x
    • ba81945 chore: prepare Tokio 1.20.3 release
    • 763bdc9 ci: run WASI tasks using latest Rust
    • 9f98535 Merge remote-tracking branch 'origin/tokio-1.18.x' into fix-named-pipes-1.20
    • 9241c3e chore: prepare Tokio v1.18.4 release
    • 699573d net: fix named pipes server configuration builder
    • 3ce5a26 chore: prepare Tokio v1.23 release (#5270)
    • 644cb82 rt: fix *_closed false positives (#5231)
    • a1316cd io: impl std::io::BufRead on SyncIoBridge\<T> (#5265)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(0.2.4)
Owner
Carghai74
I'm a swift, dart, HTML5, CSS, python, elixir, C#, C++, and ruby dev who mainly does mobile development. I also won 2022 Hills hacks 1st place.
Carghai74
A tool & library to help you with the compiler course.

Compiler Course Helper Support: eliminate left recursion (require grammar with no cycles or ϵ-production) calculate nullable, first sets, follow, sets

水夕 4 May 2, 2022
A simpler and 5x faster alternative to HashMap in Rust, which doesn't use hashing and doesn't use heap

At least 5x faster alternative of HashMap, for very small maps. It is also faster than FxHashMap, hashbrown, ArrayMap, and nohash-hasher. The smaller

Yegor Bugayenko 12 Apr 19, 2023
A tray application for Windows that gives you push notifications and instant downloads of new posts, messages and stories posted by models you subscribe to on Onlyfans.

OF-notifier A tray application for Windows that gives you push notifications and instant downloads of new posts, messages and stories posted by models

Gentlemen Mercenary 10 Dec 20, 2022
A dos attack for you to use!

Welcome To Rust Dos attacker! Why should I use it? It has unrivaled speeds because it is built in rust and hand optimized. It also comes with an AI mo

Carghai74 5 Dec 2, 2022
A console viewer for trees – pet project to help me learn Rust.

treeviewer This is a pet project to help me learn Rust. But maybe it’ll end up being of actual use for someone? The idea is to write a program that, g

Daniel Janus 3 Jul 15, 2023
A webapp that reads your articles to you while you're on the subway

ReadToMyShoe Video Demo A website that reads articles to you, even when you're offline. Still in early development. This is a full-stack Rust webapp,

Michael Rosenberg 20 Dec 10, 2022
proc-macro to help with using surrealdb's custom functions

SurrealDB Functions This is a proc-macro crate that given a path to a .surql file or a folder of .surql files, will parse DEFINE FUNCTION fn::s inside

Aly 5 Jul 30, 2023
A tool to make grocery lists written in Rust

grusterylist: makes grocery lists, written in Rust grusterylist uses and can add to local libraries of user-added recipes and grocery items to put tog

null 3 Jun 17, 2022
A collection of crates to make minecraft development (client, server) with rust possible.

rust-craft rust-craft is a collection of crates to make minecraft development (client, server) with rust possible. Motivation There's no better way of

João Victor 15 Mar 23, 2023
Make a .scratch directory to keep random scribbles in

mkscratch Creates a directory named .scratch in your current working directory which will be ignored by Git. Useful for keeping around miscellaneous f

Kayla 3 Oct 21, 2022