UNPKG

morpheus4j

Version:

Morpheus is a migration tool for Neo4j. It aims to be a simple and intuitive way to migrate your database.

24 lines (23 loc) 1.17 kB
import { DateTime, Duration } from 'neo4j-driver'; /** * Generates a CRC32 checksum from an array of string statements. * * The behavior of this function is controlled by the environment variable * 'MORPHEUS_USE_ORIGINAL_CHECKSUM_IMPLEMENTATION'. When set to 'true', it uses * the original implementation with undefined as the initial value. * * @param {string[]} statements - An array of strings to calculate the checksum from * @returns {string} The calculated CRC32 checksum as a string * * @example * // Set environment variable for original implementation (recommended) * // process.env.MORPHEUS_USE_ORIGINAL_CHECKSUM_IMPLEMENTATION = 'true' * const checksum = generateChecksum(statements); * * @deprecated The default behavior (with initial value of 0) is deprecated and will be removed * in a future version. Please set MORPHEUS_USE_ORIGINAL_CHECKSUM_IMPLEMENTATION='true' in your * environment for consistent behavior with previous versions. */ export declare const generateChecksum: (statements: string[]) => string; export declare const convertInToTime: (inDate: Duration) => string; export declare const convertAtToDate: (at: DateTime) => Date;