fetch from database directly

Ali Ber3 years ago

Hello anton , is it possible to add tables in the data base , without creating api for it in the backend ,
my idea , is to fetch this data directly from the database server

Anton Tananaev3 years ago

Why not? Anything is possible.

Ali Ber3 years ago

thanks, so instead of fetching the traccar api, i will fetch directly the database , does this affect performance, or time ?

Anton Tananaev3 years ago

There's only way to find out - try it.

mdtaylorlrim3 years ago

I do this regularly. It works fine and does not seem to cause any issues with performance. However, I do not add tables to the traccar database, I simply read from the existing tables.

The API would be a more permanent method because if Traccar changes the database schema then the API continues to work where a direct call would require code changes in the calling program.

Ali Ber3 years ago

thanks taylor.