Easy Cassandra Driver

I made a cassandra driver but easier than cassandra-driver

Souce Code: Click Me!

Npmjs Page: Click Me!

if you want usage execute:
connection.client.execute(“SELECT * FROM “)

İf you find a bug/issue please report Report/Issue Link

Simple Usage:


This content originally appeared on DEV Community and was authored by Raksix

I made a cassandra driver but easier than cassandra-driver

Souce Code: Click Me!

Npmjs Page: Click Me!

if you want usage execute:
connection.client.execute("SELECT * FROM ")

İf you find a bug/issue please report Report/Issue Link

Simple Usage:

const cassandra = require("raksix-cassandra")

// connect config payload
const config = {
    secure_path: "./secure-zip-path",
    client_id: "client_id",
    client_secret: "client_secret",
    keyspace: "keyspace"
}

// connect cassandra-driver
const connection = cassandra.connect(config.secure_path, config.client_id, config.client_secret, config.keyspace)

// table payload
const data2 = {
    id: "text PRIMARY KEY",
    name: "text",
    email: "text",
    password: "text"
}


// create table method
connection.create_table("test", data2)


// insert payload
const data3 = {
    id: "1",
    name: "furkan",
    email: "furkan@gmail.com",
    password: "1234"
}


// insert method
connection.instert("test", data3)


// find method
connection.find("test", { name: "furkan" }).then(rs => {
    // result
    console.log(rs.rows)
})
// find all
connection.find_all("test").then(rs => {
    //  result
    console.log(rs.rows)
})

// update method
connection.update("test", { name: "furkan" }, { email: "raksix@raksix.wtf", password: "12346" })


This content originally appeared on DEV Community and was authored by Raksix


Print Share Comment Cite Upload Translate Updates
APA

Raksix | Sciencx (2021-05-13T14:46:41+00:00) Easy Cassandra Driver. Retrieved from https://www.scien.cx/2021/05/13/easy-cassandra-driver/

MLA
" » Easy Cassandra Driver." Raksix | Sciencx - Thursday May 13, 2021, https://www.scien.cx/2021/05/13/easy-cassandra-driver/
HARVARD
Raksix | Sciencx Thursday May 13, 2021 » Easy Cassandra Driver., viewed ,<https://www.scien.cx/2021/05/13/easy-cassandra-driver/>
VANCOUVER
Raksix | Sciencx - » Easy Cassandra Driver. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/13/easy-cassandra-driver/
CHICAGO
" » Easy Cassandra Driver." Raksix | Sciencx - Accessed . https://www.scien.cx/2021/05/13/easy-cassandra-driver/
IEEE
" » Easy Cassandra Driver." Raksix | Sciencx [Online]. Available: https://www.scien.cx/2021/05/13/easy-cassandra-driver/. [Accessed: ]
rf:citation
» Easy Cassandra Driver | Raksix | Sciencx | https://www.scien.cx/2021/05/13/easy-cassandra-driver/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.