1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Rename opfs-sahpool removeCapacity() to reduceCapacity().

FossilOrigin-Name: fff68e9f25a57045e9d636b02ffa073cf1b984b2587d4fce10f6e35c9988469c
This commit is contained in:
stephan
2023-07-15 11:37:34 +00:00
parent 88af76f62d
commit bb65feb869
3 changed files with 9 additions and 9 deletions

View File

@ -170,7 +170,7 @@ const installOpfsVfs = async function(sqlite3){
files. Returns a Promise resolving to the number of
removed files.
*/
removeCapacity: async function(n){
reduceCapacity: async function(n){
let nRm = 0;
for(const ah of Array.from(this.availableSAH)){
if(nRm === n || this.getFileCount() === this.getCapacity()){
@ -645,7 +645,7 @@ const installOpfsVfs = async function(sqlite3){
};
OpfsSAHPoolDb.prototype = Object.create(sqlite3.oo1.DB.prototype);
OpfsSAHPoolDb.addPoolCapacity = async (n)=>SAHPool.addCapacity(n);
OpfsSAHPoolDb.removePoolCapacity = async (n)=>SAHPool.removeCapacity(n);
OpfsSAHPoolDb.reducePoolCapacity = async (n)=>SAHPool.reduceCapacity(n);
OpfsSAHPoolDb.getPoolCapacity = ()=>SAHPool.getCapacity();
OpfsSAHPoolDb.getPoolUsage = ()=>SAHPool.getFileCount();
sqlite3.oo1.OpfsSAHPoolDb = OpfsSAHPoolDb;