Index: trunk/psLib/src/db/psDB.c
===================================================================
--- trunk/psLib/src/db/psDB.c	(revision 4981)
+++ trunk/psLib/src/db/psDB.c	(revision 5136)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-27 01:33:40 $
+ *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-26 21:13:16 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -501,13 +501,13 @@
 
             // copy field data and convert NULLs to the appropriate NaN value
-            if (pType == PS_META_STR) {
+            if (pType == PS_DATA_STRING) {
                 psMetadataAddStr(md, PS_LIST_TAIL, field[i].name, 0, "", data);
-            } else if (pType == PS_META_S32) {
+            } else if (pType == PS_DATA_S32) {
                 psMetadataAddS32(md, PS_LIST_TAIL, field[i].name, 0, "", atoll(data));
-            } else if (pType == PS_META_F32) {
+            } else if (pType == PS_DATA_F32) {
                 psMetadataAddF32(md, PS_LIST_TAIL, field[i].name, 0, "", atof(data));
-            } else if (pType == PS_META_F64) {
+            } else if (pType == PS_DATA_F64) {
                 psMetadataAddF64(md, PS_LIST_TAIL, field[i].name, 0, "", atof(data));
-            } else if (pType == PS_META_BOOL) {
+            } else if (pType == PS_DATA_BOOL) {
                 psMetadataAdd(md, PS_LIST_TAIL, field[i].name, pType, "", atoi(data));
             } else {
@@ -710,6 +710,6 @@
         // column as an psArray of strings; otherwise fetch the column as a
         // psVector.
-        if (pType == PS_META_STR) {
-            // PS_META_UNKNOWN -> PS_META_ARRAY ?
+        if (pType == PS_DATA_STRING) {
+            // PS_DATA_UNKNOWN -> PS_DATA_ARRAY ?
             column = psDBSelectColumn(dbh, tableName, field[i].name, 0);
             psMetadataAddArray(table, PS_LIST_TAIL, field[i].name, 0, "", column);
@@ -946,5 +946,5 @@
                               ? (my_bool *)&isNull
                               : NULL;
-        } else if (item->type == PS_META_STR) {
+        } else if (item->type == PS_DATA_STRING) {
             // convert NaNs to NULL and set the buffer_length for strings
 
@@ -957,8 +957,8 @@
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE , true,
-                    "FIXME: Only type of PS_TYPE_S32 (PS_META_S32), "
-                    "PS_TYPE_F32 (PS_META_F32), PS_TYPE_F64 (PS_META_F64), "
-                    "PS_TYPE_BOOL (PS_META_BOOL), "
-                    "and PS_META_STR are supported.");
+                    "FIXME: Only type of PS_TYPE_S32 (PS_DATA_S32), "
+                    "PS_TYPE_F32 (PS_DATA_F32), PS_TYPE_F64 (PS_DATA_F64), "
+                    "PS_TYPE_BOOL (PS_DATA_BOOL), "
+                    "and PS_DATA_STRING are supported.");
 
             psFree(cursor);
@@ -1002,18 +1002,18 @@
     // find column name and type
     while ((item = psListGetAndIncrement(cursor))) {
-        if ((item->type == PS_META_S32)  || (item->type == PS_META_F32) || (item->type == PS_META_F64) ||
+        if ((item->type == PS_DATA_S32)  || (item->type == PS_DATA_F32) || (item->type == PS_DATA_F64) ||
                 (item->type == PS_TYPE_S32)  || (item->type == PS_TYPE_F32) || (item->type == PS_TYPE_F64) ||
-                (item->type == PS_TYPE_BOOL) || (item->type == PS_META_BOOL)) {
+                (item->type == PS_TYPE_BOOL) || (item->type == PS_DATA_BOOL)) {
             // + column name + _ + column type
             colType = psDBPTypeToSQL(item->type);
             psStringAppend(&query, "%s %s", item->name, colType);
             psFree(colType);
-        } else if (item->type == PS_META_STR) {
+        } else if (item->type == PS_DATA_STRING) {
             // + column name + _ + varchar( + length + )
             psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V);
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    "FIXME: Only type of PS_META_S32, PS_META_F32, PS_META_F64, PS_META_BOOL, "
-                    "and PS_META_STR are supported, (not %d).", item->type);
+                    "FIXME: Only type of PS_DATA_S32, PS_DATA_F32, PS_DATA_F64, PS_DATA_BOOL, "
+                    "and PS_DATA_STRING are supported, (not %d).", item->type);
 
             psFree(query);
@@ -1243,13 +1243,13 @@
     while ((item = psListGetAndIncrement(cursor))) {
         // item->data must be a string
-        if ((item->type == PS_META_S32) || (item->type == PS_TYPE_S32)) {
+        if ((item->type == PS_DATA_S32) || (item->type == PS_TYPE_S32)) {
             psStringAppend(&query, "%s=%d", item->name, (int)(item->data.S32));
-        } else if ((item->type == PS_META_F32) || (item->type == PS_TYPE_F32)) {
+        } else if ((item->type == PS_DATA_F32) || (item->type == PS_TYPE_F32)) {
             psStringAppend(&query, "%s=%g", item->name, (double)(item->data.F32));
-        } else if ((item->type == PS_META_F64) || (item->type == PS_TYPE_F64)) {
+        } else if ((item->type == PS_DATA_F64) || (item->type == PS_TYPE_F64)) {
             psStringAppend(&query, "%s=%g", item->name, (double)(item->data.F64));
-        } else if ((item->type == PS_META_BOOL) || (item->type == PS_TYPE_BOOL)) {
+        } else if ((item->type == PS_DATA_BOOL) || (item->type == PS_TYPE_BOOL)) {
             psStringAppend(&query, "%s=%d", item->name, (int)(item->data.B));
-        } else if (item->type == PS_META_STR) {
+        } else if (item->type == PS_DATA_STRING) {
             // + column name + _ + like + _ + ' + value + '
             if (*(char *)item->data.V == '\0') {
@@ -1264,5 +1264,5 @@
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    "Only types PS_META_S32, PS_META_F32, PS_META_F64, PS_META_BOOL, PS_META_STR are supported");
+                    "Only types PS_DATA_S32, PS_DATA_F32, PS_DATA_F64, PS_DATA_BOOL, PS_DATA_STRING are supported");
 
             psFree(cursor);
@@ -1440,5 +1440,5 @@
         psDBAddToLookupTable(lookupTable, PS_TYPE_C64, "PS_TYPE_C64 is not supported");
         psDBAddToLookupTable(lookupTable, PS_TYPE_BOOL,"TINYINT");
-        psDBAddToLookupTable(lookupTable, PS_META_STR, "VARCHAR");
+        psDBAddToLookupTable(lookupTable, PS_DATA_STRING, "VARCHAR");
     }
 
@@ -1483,5 +1483,5 @@
 
         // Add BLOB & TEXT reverse mappings
-        value = psDBIntToString((psU64)PS_META_STR);
+        value = psDBIntToString((psU64)PS_DATA_STRING);
         psHashAdd(lookupTable, "BLOB",    value);
         psHashAdd(lookupTable, "TEXT",    value);
@@ -1584,14 +1584,14 @@
         // psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
 
-        psDBAddVoidToLookupTable(lookupTable, PS_META_STR,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_VEC,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_IMG,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_HASH,   psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_LOOKUPTABLE,
+        psDBAddVoidToLookupTable(lookupTable, PS_DATA_STRING,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        psDBAddVoidToLookupTable(lookupTable, PS_DATA_VECTOR,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        psDBAddVoidToLookupTable(lookupTable, PS_DATA_IMAGE,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        psDBAddVoidToLookupTable(lookupTable, PS_DATA_HASH,   psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        psDBAddVoidToLookupTable(lookupTable, PS_DATA_LOOKUPTABLE,
                                  psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_JPEG,   psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_PNG,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_ASTROM, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
-        psDBAddVoidToLookupTable(lookupTable, PS_META_UNKNOWN,psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        //        psDBAddVoidToLookupTable(lookupTable, PS_DATA_JPEG,   psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        //        psDBAddVoidToLookupTable(lookupTable, PS_DATA_PNG,    psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        //        psDBAddVoidToLookupTable(lookupTable, PS_DATA_ASTROM, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
+        psDBAddVoidToLookupTable(lookupTable, PS_DATA_UNKNOWN,psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false));
     }
 
Index: trunk/psLib/src/db/psDB.h
===================================================================
--- trunk/psLib/src/db/psDB.h	(revision 4981)
+++ trunk/psLib/src/db/psDB.h	(revision 5136)
@@ -10,6 +10,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-26 20:00:57 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-26 21:13:16 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -104,9 +104,9 @@
  * type is give by the psMetadataItem.type and psMetadataItem.ptype entries.  A
  * lookup table should be used to convert from PSLib types into MySQL
- * compatible SQL data types.  For example, a PS_META_STR would map to an SQL99
- * varchar.  If the value of type is PS_META_STR then the psMetadataItem.data
+ * compatible SQL data types.  For example, a PS_DATA_STRING would map to an SQL99
+ * varchar.  If the value of type is PS_DATA_STRING then the psMetadataItem.data
  * element is set to a string with the length for the field written as a text
  * string.  The value of the psMetadataItem.data element is unused for the
- * PS_META_PRIMITIVE types.  Other psMetadata types beyond PS_META_STR and
+ * PS_META_PRIMITIVE types.  Other psMetadata types beyond PS_DATA_STRING and
  * PS_META_PRIMITIVE are not allowed in a table definition.
  *
@@ -170,5 +170,5 @@
  * values, one per row.
  *
- * Currently, the "where" specification only supports the PS_META_STR type.
+ * Currently, the "where" specification only supports the PS_DATA_STRING type.
  * The string value can be a SQL match pattern, e.g. "%foo%", or an empty
  * string, e.g. "", to match NULL field values.
@@ -189,5 +189,5 @@
  * The "row" specification uses the psMetadataItem name as the column name.
  * The field values may be specified in any order.  psMetadata types beyond
- * PS_META_STR and PS_META_PRIMITIVE are not supported.  If fields are
+ * PS_DATA_STRING and PS_META_PRIMITIVE are not supported.  If fields are
  * specified in "row" that do not exist in "tableName", the insert will fail.
  *
