I'm working on a small php project where I need some Selects/Inserts/Updates/Deletes from a MySQL database and since I don't like to write SQL by hand, I took the time to create a simple Entity Framework with handles this for me.
I deployed the whole thing on google code:
entitydataaccess - Generic Entity Data Access - Google Project Hosting
Please have a look at it and tell me your thoughts!
Small introduction:
You have to create your entities as classes according some guidelines, then you can create simle queries like those here:
Code: Select all
// Get all entities from a table (sorted by the primary key here)
$query = new EDAQuery();
$query->AddOrder(MarkerColumns::MarkerID, EDASortDirection::ASC);
$entityList = EDAEntityHandler::GetEntityList('Marker', $query);
// Get an entity by a field (primary key here)
$query = new EDAQuery();
$query->Add(new EDAEq(MarkerColumns::MarkerID, $entityID));
$foundEntity = EDAEntityHandler::GetEntity('Marker', $query);
Cheers and I'd really appreciate to get some feedback from you!
Roemer