File: query_db.go

package info (click to toggle)
golang-gopkg-rethinkdb-rethinkdb-go.v6 6.2.1-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,736 kB
  • sloc: python: 1,382; makefile: 16; sh: 9
file content (25 lines) | stat: -rw-r--r-- 828 bytes parent folder | download | duplicates (3)
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 rethinkdb

import (
	p "gopkg.in/rethinkdb/rethinkdb-go.v6/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{}{})
}