That is, I believe, only possible, if the geometry is stored in the database's native spatial format (e.g. SQL Server's Geometry/Geography, or Oracle's SDO etc.). In that case, you need to send a sql query that conforms to the underlying database's syntax (not quite sure whether all databases follow the same syntax or different).
The workaround that would work regardless of underlying database is to pass in a search geometry to find all points that intersects or is contained within the search geometry.