USC-NSL / Computational-Agroecology

6 stars 1 forks source link

Database query #64

Open fxdawnn opened 5 years ago

fxdawnn commented 5 years ago

@ralphchung This one is not finished. The database was constructed using the c++ adapter in a lab server. The server/db/table info can be referred in the code. And it's been tested the code can access the database doing the query. But the code unreadable. And the But the plant adapter to transfer the code into plant type is not finished.

  1. The makefile require some change since anything related to database should be with -lpq -lpqxx.

  2. The test is also not finished. If you can help with that.

  3. The database is finished. You can access to all data by placing select * from plants.

  4. I push the dirty file db_connector.cpp which is like the main file for data. And you can mordify that for testing.

TL;DR THE FUNCTION IS FINISHED, CAN'T CONFIRM TO THE CURRENT STRUCTURE

ralphchung commented 5 years ago

I think it would be better to focus on your previous PR first.

fxdawnn commented 5 years ago

I think this should be done in refactor. The database is there to keep people aware that some of the old functions are not migrated into the new structure.

ralphchung commented 5 years ago

Removed the part of parsing .csv files. This should be easy with the use of COPY SQL command.

ralphchung commented 5 years ago

In today's meeting, Barath said put database things aside for now.