About this question
I want to know what is the difference between Database.QueryLocator() and simple SOQL Query i.e.
Listinvent = [Select Id,Quantity__c,AccountId__c,Name,Expiry_Date__c From Inventory__c]; And
Database.getQueryLocator([Select Id,Quantity__c,AccountId__c,Name,Expiry_Date__c From Inventory__c]);I want to know what the QueryLocator class is in Apex.. I went through this link but cannot understand its structure.