File: query_db.go

package info (click to toggle)
golang-gopkg-dancannon-gorethink.v1 1.4.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 764 kB
  • sloc: makefile: 3
file content (25 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (2)
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/dancannon/gorethink.v1/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{}{})
}