Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 810 Bytes

repl.md

File metadata and controls

33 lines (26 loc) · 810 Bytes
layout api-command
language Python
permalink api/python/repl/
command repl
js false
java false
related_commands
connect use close
connect/
use/
close/

Command syntax

{% apibody %} conn.repl() {% endapibody %}

Description

Set the default connection to make REPL use easier. Allows calling .run() on queries without specifying a connection.

Note: Avoid using repl in application code. RethinkDB connection objects are not thread-safe, and calls to connect from multiple threads may change the global connection object used by repl. Applications should specify connections explicitly.

Example: Set the default connection for the REPL, then call run() without specifying the connection.

r.connect(db='marvel').repl()
r.table('heroes').run()