const currentPage = dv.current().file;
const dailyPages = dv.pages('"0-Daily"').sort(k=>k.file.name, "asc");
const currentPageName = currentPage.name;
const index = dailyPages.findIndex((e) => {return e.file.name === currentPageName});
if (index < 1) {
	dv.table(["File", "Created", "Size"],[]);
} else {
	const lastIndex = index - 1;
	const lastPage = dailyPages[lastIndex].file;
	const allPages = dv.pages().values;
	const searchPages = [];
	const lastTime = dv.parse(lastPage.name);
	const currentTime = dv.parse(currentPage.name);
 
	for (let page of allPages) {
		const pageFile = page.file;
		if (pageFile.cday > lastTime && pageFile.cday <= currentTime) {
		  searchPages.push(pageFile);
		}
	}
	dv.table(["File", "Created", "Size"], searchPages.sort((a, b) => a.ctime > b.ctime ? 1 : -1).map(b => [b.link, b.ctime, b.size]));
}
 

一些数据库选型

Embedable engines

  • Derby - Open source relational database implemented entirely in Java.
  • Duckdb - In-process SQL OLAP Database Management System.
  • HaloDB - Java fast, log structured key-value store.
  • H2 - H2 is an embeddable RDBMS written in Java.
  • LevelDB - LevelDB is a fast key-value storage library written at Google.
  • lmdbjava - Lightning Memory Database (LMDB) for Java
  • PalDB - Embeddable write-once key-value store written in Java.
  • RocksDB - Library that provides an embeddable, persistent key-value store for fast storage.
  • MapDB - Fast and easy to use embedded Java database engine.
  • Xodus - JetBrains Xodus is a Java transactional schema-less embedded database.
  • verneuil - VFS extension for SQLite that asynchronously replicates databases to S3-compatible blob stores
  • Litestream - Streaming replication for SQLite
  • whippet-db - Fast embedded key-value database engine for Java
  • SwayDB - Persistent and in-memory key-value storage engine for the JVM that scales on a single machine

Key-value

  • Immudb - immutable database based on zero trust, SQL and Key-Value, tamperproof, data change history

Time series