forked from rethinkdb/rethinkdb-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
query_db.go
25 lines (21 loc) · 825 Bytes
/
query_db.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package gorethink
import (
p "gopkg.in/gorethink/gorethink.v3/ql2"
)
// DBCreate creates a database. A RethinkDB database is a collection of tables,
// similar to relational databases.
//
// Note: that you can only use alphanumeric characters and underscores for the
// database name.
func DBCreate(args ...interface{}) Term {
return constructRootTerm("DBCreate", p.Term_DB_CREATE, args, map[string]interface{}{})
}
// DBDrop drops a database. The database, all its tables, and corresponding data
// will be deleted.
func DBDrop(args ...interface{}) Term {
return constructRootTerm("DBDrop", p.Term_DB_DROP, args, map[string]interface{}{})
}
// DBList lists all database names in the system.
func DBList(args ...interface{}) Term {
return constructRootTerm("DBList", p.Term_DB_LIST, args, map[string]interface{}{})
}