Bläddra i källkod

HPCC-12994 Change Exist to Exists

Signed-off-by: James Noss <james.noss@lexisnexis.com>
James Noss 10 år sedan
förälder
incheckning
d1f4df67b3

+ 1 - 1
plugins/memcached/lib_memcached.ecllib

@@ -34,7 +34,7 @@ export memcached := SERVICE : plugin('memcached')
   REAL GetReal(CONST VARSTRING options, CONST VARSTRING key, CONST VARSTRING partitionKey = '') : cpp,action,context,entrypoint='MGetDouble';
   DATA GetData(CONST VARSTRING options, CONST VARSTRING key, CONST VARSTRING partitionKey = '') : cpp,action,context,entrypoint='MGetData';
 
-  BOOLEAN Exist(CONST VARSTRING options, CONST VARSTRING key, CONST VARSTRING partitionKey = '') : cpp,action,context,entrypoint='MExist';
+  BOOLEAN Exists(CONST VARSTRING options, CONST VARSTRING key, CONST VARSTRING partitionKey = '') : cpp,action,context,entrypoint='MExists';
   CONST VARSTRING KeyType(CONST VARSTRING options, CONST VARSTRING key, CONST VARSTRING partitionKey = '') : cpp,action,context,entrypoint='MKeyType'; //NOTE: calls get
   Clear(CONST VARSTRING options) : cpp,action,context,entrypoint='MClear';
 END;

+ 5 - 5
plugins/memcached/memcachedplugin.cpp

@@ -97,7 +97,7 @@ public :
     void getVoidPtrLenPair(ICodeContext * ctx, const char * partitionKey, const char * key, size_t & valueLength, void * & value, eclDataType eclType);
 
     void clear(ICodeContext * ctx, unsigned when);
-    bool exist(ICodeContext * ctx, const char * key, const char * partitionKey);
+    bool exists(ICodeContext * ctx, const char * key, const char * partitionKey);
     eclDataType getKeyType(const char * key, const char * partitionKey);
 
     bool isSameConnection(const char * _options) const;
@@ -442,7 +442,7 @@ void MemCachedPlugin::MCached::clear(ICodeContext * ctx, unsigned when)
     assertOnError(memcached_flush(connection, (time_t)(when)), "'Clear' request failed - ");
 }
 
-bool MemCachedPlugin::MCached::exist(ICodeContext * ctx, const char * key, const char * partitionKey)
+bool MemCachedPlugin::MCached::exists(ICodeContext * ctx, const char * key, const char * partitionKey)
 {
 #if (LIBMEMCACHED_VERSION_HEX<0x53000)
     throw makeStringException(0, "memcached_exist not supported in this version of libmemcached");
@@ -458,7 +458,7 @@ bool MemCachedPlugin::MCached::exist(ICodeContext * ctx, const char * key, const
         return false;
     else
     {
-        assertOnError(rc, "'Exist' request failed - ");
+        assertOnError(rc, "'Exists' request failed - ");
         return true;
     }
 #endif
@@ -594,10 +594,10 @@ ECL_MEMCACHED_API void ECL_MEMCACHED_CALL MClear(ICodeContext * ctx, const char
     OwnedMCached serverPool = MemCachedPlugin::createConnection(ctx, options);
     serverPool->clear(ctx, 0);
 }
-ECL_MEMCACHED_API bool ECL_MEMCACHED_CALL MExist(ICodeContext * ctx, const char * options, const char * key, const char * partitionKey)
+ECL_MEMCACHED_API bool ECL_MEMCACHED_CALL MExists(ICodeContext * ctx, const char * options, const char * key, const char * partitionKey)
 {
     OwnedMCached serverPool = MemCachedPlugin::createConnection(ctx, options);
-    return serverPool->exist(ctx, key, partitionKey);
+    return serverPool->exists(ctx, key, partitionKey);
 }
 ECL_MEMCACHED_API const char * ECL_MEMCACHED_CALL MKeyType(ICodeContext * ctx, const char * options, const char * key, const char * partitionKey)
 {

+ 1 - 1
plugins/memcached/memcachedplugin.hpp

@@ -61,7 +61,7 @@ extern "C++"
     ECL_MEMCACHED_API void             ECL_MEMCACHED_CALL MGetUChar (ICodeContext * _ctx, size32_t & valueLength, UChar * & returnValue, const char * options, const char * key, const char * partitionKey);
     ECL_MEMCACHED_API void             ECL_MEMCACHED_CALL MGetData  (ICodeContext * _ctx,size32_t & returnLength, void * & returnValue, const char * options, const char * key, const char * partitionKey);
     //--------------------------------AUXILLARIES---------------------------
-    ECL_MEMCACHED_API bool             ECL_MEMCACHED_CALL MExist  (ICodeContext * _ctx, const char * options, const char * key, const char * partitionKey);
+    ECL_MEMCACHED_API bool             ECL_MEMCACHED_CALL MExists (ICodeContext * _ctx, const char * options, const char * key, const char * partitionKey);
     ECL_MEMCACHED_API const char *     ECL_MEMCACHED_CALL MKeyType(ICodeContext * _ctx, const char * options, const char * key, const char * partitionKey);
     ECL_MEMCACHED_API void             ECL_MEMCACHED_CALL MClear  (ICodeContext * _ctx, const char * options);
 }

+ 2 - 2
testing/regress/ecl/memcachedtest.ecl

@@ -51,11 +51,11 @@ DATA mydata := x'd790d791d792d793d794d795d796d798d799d79ad79bd79cd79dd79dd79ed79
 SetData(servers, 'data', mydata);
 GetData(servers,'data');
 
-Exist(servers, 'utf8');
+memcached.Exists(servers, 'utf8');
 KeyType(servers,'utf8');
 
 //The following test some exceptions
 GetInteger(servers, 'pi');
 Clear(servers);
-Exist(servers, 'utf8');
+memcached.Exists(servers, 'utf8');
 KeyType(servers,'utf8');