From ebf4767701457f30281aa0ca86159911b0e1edb3 Mon Sep 17 00:00:00 2001 From: MMagueta Date: Sat, 20 Sep 2025 04:42:09 +0000 Subject: deploy: 5ed1406c81044ff73fd919b5aad184aaed0a174b --- tuple_8c.html | 338 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 338 insertions(+) create mode 100644 tuple_8c.html (limited to 'tuple_8c.html') diff --git a/tuple_8c.html b/tuple_8c.html new file mode 100644 index 0000000..2c92288 --- /dev/null +++ b/tuple_8c.html @@ -0,0 +1,338 @@ + + + + + + + +Relational Algebra Engine: src/tuple.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
Relational Algebra Engine +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+ +
tuple.c File Reference
+
+
+ +

Tuple implementation for the Relational Algebra Engine. +More...

+
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "tuple.h"
+
+Include dependency graph for tuple.c:
+
+
+ + + + + + + + + + + + + + + + + + +
+
+ + + + + +

+Classes

struct  FindAttributeContext
 
struct  TupleEqualsContext
 
+ + + + + + + + + + + + + + + + + + + +

+Functions

Tuple * tuple_create (void)
 Create a new Tuple.
 
void tuple_destroy (Tuple *t)
 Destroy a Tuple and free its memory.
 
int tuple_add_attribute (Tuple *t, Attribute *attr)
 Add an Attribute to a Tuple.
 
void tuple_print (const Tuple *t)
 Print a Tuple to stdout.
 
Attribute * tuple_find_attribute (Tuple *t, const char *name)
 Find an Attribute in a Tuple by name.
 
int tuple_equals (Tuple *a, Tuple *b)
 Check if two Tuples are equal (all attributes match).
 
+

Detailed Description

+

Tuple implementation for the Relational Algebra Engine.

+

Handles creation, destruction, and comparison of tuples, which are sets of attributes and serve as the elements of relations in the relational model.

+

Function Documentation

+ +

◆ tuple_add_attribute()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int tuple_add_attribute (Tuple * t,
Attribute * attr 
)
+
+ +

Add an Attribute to a Tuple.

+
Parameters
+ + + +
tPointer to the Tuple.
attrPointer to the Attribute to add.
+
+
+
Returns
1 if added, 0 if already present, -1 on error.
+ +
+
+ +

◆ tuple_create()

+ +
+
+ + + + + + + + +
Tuple * tuple_create (void )
+
+ +

Create a new Tuple.

+
Returns
Pointer to new Tuple, or NULL on failure.
+ +
+
+ +

◆ tuple_destroy()

+ +
+
+ + + + + + + + +
void tuple_destroy (Tuple * t)
+
+ +

Destroy a Tuple and free its memory.

+
Parameters
+ + +
tPointer to the Tuple to destroy.
+
+
+ +
+
+ +

◆ tuple_equals()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int tuple_equals (Tuple * a,
Tuple * b 
)
+
+ +

Check if two Tuples are equal (all attributes match).

+
Parameters
+ + + +
aPointer to first Tuple.
bPointer to second Tuple.
+
+
+
Returns
1 if equal, 0 otherwise.
+ +
+
+ +

◆ tuple_find_attribute()

+ +
+
+ + + + + + + + + + + + + + + + + + +
Attribute * tuple_find_attribute (Tuple * t,
const char * name 
)
+
+ +

Find an Attribute in a Tuple by name.

+
Parameters
+ + + +
tPointer to the Tuple.
nameName of the Attribute to find.
+
+
+
Returns
Pointer to the found Attribute, or NULL if not found.
+ +
+
+ +

◆ tuple_print()

+ +
+
+ + + + + + + + +
void tuple_print (const Tuple * t)
+
+ +

Print a Tuple to stdout.

+
Parameters
+ + +
tPointer to the Tuple to print.
+
+
+ +
+
+
+ + + + -- cgit v1.2.3