projects
/
mp-xquery-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8a91304
)
Using query->execute to get result into string
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 27 May 2014 13:49:46 +0000
(15:49 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 27 May 2014 13:49:46 +0000
(15:49 +0200)
src/tst.cpp
patch
|
blob
|
history
diff --git
a/src/tst.cpp
b/src/tst.cpp
index
f35415d
..
893be85
100644
(file)
--- a/
src/tst.cpp
+++ b/
src/tst.cpp
@@
-37,7
+37,7
@@
example_2(Zorba* aZorba)
// lQuery->setFileName("http://base/");
lQuery->setFileName("/home/adam/proj/marc2bibframe/xbin/");
// lQuery->setFileName("http://base/");
lQuery->setFileName("/home/adam/proj/marc2bibframe/xbin/");
- lQuery->compile(*qfile.get(), lHints);
+ lQuery->compile(*qfile, lHints);
zorba::DynamicContext* lDynamicContext = lQuery->getDynamicContext();
zorba::DynamicContext* lDynamicContext = lQuery->getDynamicContext();
@@
-57,7
+57,13
@@
example_2(Zorba* aZorba)
"/home/adam/proj/yaz/test/marc7.xml");
lDynamicContext->setVariable("marcxmluri", lItem);
"/home/adam/proj/yaz/test/marc7.xml");
lDynamicContext->setVariable("marcxmluri", lItem);
- std::cout << lQuery << std::endl;
+ std::stringstream ss;
+
+ lQuery->execute(ss);
+
+ std::string result = ss.str();
+
+ std::cout << result << std::endl;
return true;
}
return true;
}