Skip to content

postgresql: /usr/include/libpq-fe.h#5

Open
jamesaxl wants to merge 1 commit intoloentar:masterfrom
jamesaxl:master
Open

postgresql: /usr/include/libpq-fe.h#5
jamesaxl wants to merge 1 commit intoloentar:masterfrom
jamesaxl:master

Conversation

@jamesaxl
Copy link

check also if libpq-fe.h on /usr/include/, in my case I have this header on /usr/include/ and not /usr/include/postgresql (Slackware).

@loentar
Copy link
Owner

loentar commented Jan 14, 2017

Then source code and include paths needs to be modified as well, because libpq-fe.h is included from postgresql directory
https://github.com/loentar/ngrest-db/blob/master/drivers/postgres/src/PostgresDb.cpp#L24

@jamesaxl
Copy link
Author

jamesaxl commented Jan 14, 2017 via email

@jamesaxl
Copy link
Author

jamesaxl commented Jan 14, 2017 via email

@loentar
Copy link
Owner

loentar commented Jan 14, 2017

You forgot to add

// *table: students

before struct Students?

And if you have more questions feel free to ask at: https://groups.google.com/forum/#!forum/ngrest

@jamesaxl
Copy link
Author

jamesaxl commented Jan 14, 2017 via email

@jamesaxl
Copy link
Author

jamesaxl commented Jan 14, 2017 via email

@loentar
Copy link
Owner

loentar commented Jan 14, 2017

It should be possible. If you have any troubles with that, please say.

@jamesaxl
Copy link
Author

jamesaxl commented Jan 14, 2017 via email

@loentar
Copy link
Owner

loentar commented Jan 14, 2017

Well, you should try to pass db settings explicitly:

DbManager(ngrest::PostgresDbSettings("vfd_data", "barnamy", "******", "192.168.0.1"))

@loentar
Copy link
Owner

loentar commented Jan 14, 2017

Also you can simplify "add" function like that.

int Vfd::add_video(const Videos& video)
{
    return NotesDb::inst().getTable<Videos>()
            .insert(video)
            .lastInsertId();
}

anyway id is ignored upon insertion by default.

@jamesaxl
Copy link
Author

jamesaxl commented Jan 15, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants