fix comments in server/*/get_stock.rs

This commit is contained in:
ayham 2021-07-17 10:36:54 +03:00
parent 0ff12e03f8
commit 863dbad593
Signed by: ayham
GPG Key ID: EAB7F5A9DF503678
1 changed files with 6 additions and 0 deletions

View File

@ -4,8 +4,10 @@ use crate::common::misc::return_flags::ReturnFlags;
/// Returns the whole stock data from the postgres SQL database.
///
/// Takes in a stock symbol and returns the whole data entries of the searched stock.
/// Should be used in Async contexts.
///
/// Arguments:
/// sql_conn - The SQL connection to use.
/// searched_symbol - The name of the stock table.
///
/// Returns: a Vec<StockVal> on success, and a string containing the reason of failure on error.
@ -56,8 +58,10 @@ pub async fn get_stock_from_db(
/// Returns stock data since an unix epoch from the postgres SQL database.
///
/// Takes in a stock symbol and returns the data entries after a specified epoch of the searched stock.
/// Should be used in Async contexts.
///
/// Arguments:
/// sql_conn - The SQL connection to use.
/// searched_symbol - The name of the stock table.
/// time_epoch - The time from which the stock data retrieved.
///
@ -115,8 +119,10 @@ pub async fn get_stock_from_db_since_epoch(
///
/// Takes in a stock symbol and returns the data entries between two specified unix epochs of the searched
/// stock.
/// Should be used in Async contexts.
///
/// Arguments:
/// sql_conn - The SQL connection to use.
/// searched_symbol - The name of the stock table.
/// first_time_epoch - The time from which the stock data is first retrieved.
/// second_time_epoch - The time from which the stock data ends.