File size: 647 Bytes
b2add11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from duckdb_manager import DuckDBManager


class CRUDOperations:
    def __init__(self, db_path):
        self.db_manager = DuckDBManager(db_path)

    def create(self, table_name, columns, values):
        self.db_manager.create_table(table_name, columns)
        self.db_manager.insert(table_name, values)

    def read(self, table_name, columns):
        return self.db_manager.select(table_name, columns)

    def update(self, table_name, set_columns, where_clause):
        self.db_manager.update(table_name, set_columns, where_clause)

    def delete(self, table_name, where_clause):
        self.db_manager.delete(table_name, where_clause)