From 0e2fe400d9cb82150d83c48404bead5b5d447a16 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 18 Dec 2003 16:42:52 +0000 Subject: [PATCH] Look up index-names as "index." in the qualifier configuration file, falling back to the old "qualifier." only if this fails. --- src/cqltransform.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/cqltransform.c b/src/cqltransform.c index 3f6586a..7008af4 100644 --- a/src/cqltransform.c +++ b/src/cqltransform.c @@ -1,4 +1,4 @@ -/* $Id: cqltransform.c,v 1.1 2003-10-27 12:21:30 adam Exp $ +/* $Id: cqltransform.c,v 1.2 2003-12-18 16:42:52 mike Exp $ Copyright (C) 2002-2003 Index Data Aps @@ -353,8 +353,13 @@ void cql_transform_r(cql_transform_t ct, (*pr)("\" ", client_data); return ; } - cql_pr_attr(ct, "qualifier.", n_full, "srw.serverChoice", - pr, client_data, 16); + if (!cql_pr_attr(ct, "index.", n_full, "srw.serverChoice", + pr, client_data, 16)) { + /* No index.foo; reset error and fall back to qualifier.foo */ + if (ct->error == 16) ct->error = 0; + cql_pr_attr(ct, "qualifier.", n_full, "srw.serverChoice", + pr, client_data, 16); + } } if (cn->u.st.relation && !strcmp(cn->u.st.relation, "=")) -- 1.7.10.4