-/* $Id: logic.c,v 1.37 2007-06-06 11:56:35 marc Exp $
+/* $Id: logic.c,v 1.38 2007-06-07 12:27:03 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
}
record = record_create(se->nmem,
- service->num_metadata, service->num_sortkeys);
- record_assign_client(record, cl);
+ service->num_metadata, service->num_sortkeys, cl);
mergekey_norm = (xmlChar *) nmem_strdup(se->nmem, (char*) mergekey);
xmlFree(mergekey);
-/* $Id: record.c,v 1.8 2007-04-26 12:12:19 marc Exp $
+/* $Id: record.c,v 1.9 2007-06-07 12:27:03 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
02111-1307, USA.
*/
-/* $Id: record.c,v 1.8 2007-04-26 12:12:19 marc Exp $ */
+/* $Id: record.c,v 1.9 2007-06-07 12:27:03 adam Exp $ */
#include <string.h>
}
-struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys)
+struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
+ struct client *client)
{
struct record * record = 0;
int i = 0;
record = nmem_malloc(nmem, sizeof(struct record));
record->next = 0;
- // which client should I use for record->client = cl; ??
- record->client = 0;
+ record->client = client;
record->metadata
= nmem_malloc(nmem,
return record;
}
-
-struct client * record_assign_client(struct record * record,
- struct client * client)
-{
- record->client = client;
- return client;
-}
-
-
struct record_metadata * record_metadata_create(NMEM nmem)
{
struct record_metadata * rec_md
-/* $Id: record.h,v 1.8 2007-04-27 11:56:41 marc Exp $
+/* $Id: record.h,v 1.9 2007-06-07 12:27:03 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
};
-struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys);
+struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
+ struct client *client);
struct record_metadata * record_metadata_create(NMEM nmem);
union data_types data);
-struct client * record_assign_client(struct record * record,
- struct client *client);
-
-
-
union data_types * record_assign_sortkey_field_id(NMEM nmem,
struct record * record,
int field_id,
-/* $Id: test_record.c,v 1.5 2007-05-29 07:16:50 marc Exp $
+/* $Id: test_record.c,v 1.6 2007-06-07 12:27:03 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
// testing record things
- record = record_create(nmem, 4, 3);
+ record = record_create(nmem, 4, 3, client);
YAZ_CHECK(record);
- // why on earth do we have a client dangeling from the record ??
- record->client = client;
-
tmp_md = record_metadata_insert(nmem, &(record->metadata[0]), data_text);
YAZ_CHECK(tmp_md);
YAZ_CHECK(0 == record->metadata[0]->next);