Skip to content

nazaninsbr/superhero-dataset-rethinkdb-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

a rethinkdb tutorial

run the rethinkdb database in another tab of your terminal and then run the code here.

rethinkdb

you can find some of the commands here:

notes

  1. create db
r.db('python_tutorial').table_create('heroes').run()
  1. get all db names
r.db_list().run()
  1. create table
r.db('python_tutorial').table('heroes')
  1. insert to a table
table_variable_name.insert([
	{}, 
	{}, 
	{}
]).run()
  1. update values
heroes.update({
	'appearances_count': r.row['appearances_count'] + 1
}).run()
  1. filter table rows based on some value
table_variable_name.filter(r.row['appearances_count'] >= 100).run()
  1. get a value by its id
table_variable_name.get('d7d5e949-3f71-4e21-b5b7-42b6e7048ea3').run()
  1. delete all things that have some value
r.table("comments").filter({"id_post": 3}).delete().run(conn)

About

the very basics of working with rethinkdb

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages