Function: getSoilAnalyses()
getSoilAnalyses(
fdm
,principal_id
,b_id
,timeframe?
):Promise
<getSoilAnalysisType
[]>
Defined in: fdm-core/src/soil.ts:245
Retrieves all soil analysis records for a specified field, sorted by sampling date in descending order.
Parameters
fdm
any
The FDM instance providing the connection to the database. The instance can be created with createFdmServer.
principal_id
any
The identifier of the principal requesting the data.
b_id
any
The identifier of the field.
timeframe?
Optional timeframe to filter the soil analyses.
Returns
Promise
<getSoilAnalysisType
[]>
An array of soil analysis records with corresponding soil sampling details. Returns an empty array if no records are found.
Throws
If the principal lacks read permissions for the field or if the database query fails.