GitXplorerGitXplorer
z

gsoc_2024

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
66d78ec621f88ff7af031c03a1776142b8f8829c

db.c: Update get_refs_cb description

zzippy2 committed 9 months ago
Unverified
444e4adc7c4893d200dbbfb95c327ba67c347336

Initial commit

zzippy2 committed 9 months ago

README

The README file for this repository.

Google Summer of Code 2024 Coding exercise

Goal: Implement a library that serves a database

Your task is to provide the missing implementation for functions and structures in db.c. The basic usage might look like this:

  g_autoptr(Db) db = DbNew(item_free, item_get_id, NULL);
  MyItem *item = g_new(MyItem, 1);
  size_t i = 0;

  item->id = 3;

  DbInsert(db, item);

  g_autoptr(MyItem) item2 = DbGet(db, 3);

Take a look at db_test_1.c, db_test_2.c or db_test_3.c for more examples.

Steps:

The design of _Db structure is completely up to you, just like algorithms used. You can introduce new internal functions or macros you want. You can use standard C library and GLib. If you allocate any memory, do not forget to free it once no longer needed.

Please make sure your code passes tests. You can run test suite by:

  meson test -C _build/

Note: Replace _build with your build directory.

Feel free to ask any questions.