[codeface] [PATCH 20/27] Update query.initiate.response to use the current DB schema

  • From: <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
  • To: <codeface@xxxxxxxxxxxxx>
  • Date: Sun, 27 Sep 2015 02:28:16 +0200

From: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxx>

Mailing lists are not handled by name, but by a unique
numeric identifier. Update query.initiate.response
to use this convention instead of the old, now disfunctional
scheme.

Signed-off-by: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
---
codeface/R/query.r | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/codeface/R/query.r b/codeface/R/query.r
index 76d11bf..cde14c6 100644
--- a/codeface/R/query.r
+++ b/codeface/R/query.r
@@ -363,7 +363,7 @@ query.twomode.vertices <- function(con, type, ml, range.id)
{
return(dat)
}

-query.initiate.response <- function(con, ml, range.id, type=NULL) {
+query.initiate.response <- function(con, ml.id, range.id, type=NULL) {
if (!is.null(type) && !(type %in% c("subject", "content"))) {
stop("type in query.intiate.response must be NULL or subject or content!")
}
@@ -375,7 +375,7 @@ query.initiate.response <- function(con, ml, range.id,
type=NULL) {

query <- str_c("SELECT responses, initiations, responses_received, deg,
source ",
"FROM initiate_response WHERE releaseRangeId=", range.id,
- " AND ml=", sq(ml))
+ " AND mlId=", ml.id)
if (!is.null(type)) {
query <- str_c(query, " AND source=", type)
}
--
2.1.4


Other related posts:

  • » [codeface] [PATCH 20/27] Update query.initiate.response to use the current DB schema - wolfgang.mauerer