-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsave_query.Rd
executable file
·55 lines (44 loc) · 1.61 KB
/
save_query.Rd
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/web-services.R
\name{save_query}
\alias{save_query}
\alias{save_query_fromfile}
\title{Save GMQL query}
\usage{
save_query(url, queryName, queryTxt)
save_query_fromfile(url, queryName, filePath)
}
\arguments{
\item{url}{string url of server: It must contain the server address
and base url; service name is added automatically}
\item{queryName}{string name of query}
\item{queryTxt}{string text of GMQL query}
\item{filePath}{string local file path of a txt file containing a GMQL query}
}
\value{
None
}
\description{
It saves a GMQL query into repository, taken from file or inserted as text
string, using the proper GMQL web service available on a remote server
}
\details{
If you save a query with the same name of another query already stored
in repository, you will overwrite it; if no error occurs, it prints:
"Saved", otherwise it prints the error
}
\examples{
## Login to GMQL REST services suite as guest
remote_url = "http://www.gmql.eu/gmql-rest/"
login_gmql(remote_url)
## This statement saves query written directly as input string parameter
## with name "dna_query"
save_query(remote_url, "example_query",
"DATASET = SELECT() Example_Dataset_1; MATERIALIZE DATASET INTO RESULT_DS;")
## With system.file() this statement defines the path to the folder
## "example" of the package "RGMQL", and then it saves the query written
## in the text file "query1.txt" into remote repository
test_path <- system.file("example", package = "RGMQL")
test_query <- file.path(test_path, "query1.txt")
save_query_fromfile(remote_url, "query1", test_query)
}