minovakovi / akdb

An experimental relational DBMS developed by students @ Faculty of Organization and Informatics, University of Zagreb
6 stars 16 forks source link

Započeta implementacija internih SQL funkcija #265

Closed ssusac closed 1 year ago

ssusac commented 1 year ago

Throughout the development process, several changes and additions were made to the code files function.c, api_functions.c, and function.h. Here is a summary of the modifications:

In function.c:

Several mathematical functions were implemented, including add_int, subtract_int, multiply_int, divide_int, power_int, modulus_int, add_float, subtract_float, multiply_float, and divide_float. These functions perform arithmetic operations on integers and floats. The function perform_sql_operator was added to perform SQL operators based on data types. It handles addition, subtraction, multiplication, division, power, and modulus operations for both integers and floats.

In api_functions.c:

A set of string manipulation functions were implemented, including AK_now, AK_len, AK_left, AK_lower, AK_replace, AK_upper, AK_abs. These functions manipulate strings by getting the current date and time, calculating string length, extracting a portion of a string, converting strings to lowercase or uppercase, replacing substrings, and calculating the absolute value of a number. The function perform_sql_function was added to perform SQL functions based on the function name and data type.

In function.h:

The function declarations for all the added functions were included, along with their corresponding descriptions, parameters, and return types. The necessary header files, such as , , , and , were included to provide the required functionality. These modifications and additions expanded the functionality of the codebase, allowing for mathematical operations, string manipulations, and SQL function and operator handling. The code now provides a comprehensive set of functions for various data manipulation tasks.

Also I added needed comments to describe the added functions.