Skip to content

innovabinaria/scylladb_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust and ScyllaDB

This example assumes that ScyllaDB is dockerized and listening on 127.0.0.1:9042.

Technologies

My Skills

Site ScyllaDB


Connecting to ScyllaDB in Docker:

docker exec -it scylla cqlsh

Create a keyspace:

CREATE KEYSPACE my_keyspace
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
USE my_keyspace;

Create a table:

CREATE TABLE users (
    id UUID PRIMARY KEY,
    name text,
    age int,
    email text
);

Insert data:

INSERT INTO users (id, name, age, email)
VALUES (uuid(), 'Alice', 28, '[email protected]');
  1. To run the example we need to first build the examples using the following command:
cargo build 
  1. Run the example with dapr using the following command:
cargo run

If everything went well you should see the following output:

Foto 1

About

Rust interacting with ScyllaDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages