UNPKG

@openland/foundationdb-core

Version:

Node.js bindings for the FoundationDB database

176 lines (175 loc) 4.87 kB
/// <reference types="node" /> import { OptionData } from './opts'; export declare type NetworkOptions = { local_address?: string; cluster_file?: string; trace_enable?: string; trace_roll_size?: number; trace_max_logs_size?: number; trace_log_group?: string; knob?: string; TLS_plugin?: string; TLS_cert_bytes?: Buffer; TLS_cert_path?: string; TLS_key_bytes?: Buffer; TLS_key_path?: string; TLS_verify_peers?: Buffer; Buggify_enable?: true; Buggify_disable?: true; Buggify_section_activated_probability?: number; Buggify_section_fired_probability?: number; TLS_ca_bytes?: Buffer; TLS_ca_path?: string; TLS_password?: string; disable_multi_version_client_api?: true; callbacks_on_external_threads?: true; external_client_library?: string; external_client_directory?: string; disable_local_client?: true; disable_client_statistics_logging?: true; enable_slow_task_profiling?: true; supported_client_versions?: string; external_client?: true; external_client_transport_id?: number; }; export declare enum NetworkOptionCode { LocalAddress = 10, ClusterFile = 20, TraceEnable = 30, TraceRollSize = 31, TraceMaxLogsSize = 32, TraceLogGroup = 33, Knob = 40, TLSPlugin = 41, TLSCertBytes = 42, TLSCertPath = 43, TLSKeyBytes = 45, TLSKeyPath = 46, TLSVerifyPeers = 47, BuggifyEnable = 48, BuggifyDisable = 49, BuggifySectionActivatedProbability = 50, BuggifySectionFiredProbability = 51, TLSCaBytes = 52, TLSCaPath = 53, TLSPassword = 54, DisableMultiVersionClientApi = 60, CallbacksOnExternalThreads = 61, ExternalClientLibrary = 62, ExternalClientDirectory = 63, DisableLocalClient = 64, DisableClientStatisticsLogging = 70, EnableSlowTaskProfiling = 71, SupportedClientVersions = 1000, ExternalClient = 1001, ExternalClientTransportId = 1002 } export declare type DatabaseOptions = { location_cache_size?: number; max_watches?: number; machine_id?: string; datacenter_id?: string; }; export declare enum DatabaseOptionCode { LocationCacheSize = 10, MaxWatches = 20, MachineId = 21, DatacenterId = 22 } export declare type TransactionOptions = { causal_write_risky?: true; causal_read_risky?: true; causal_read_disable?: true; next_write_no_write_conflict_range?: true; commit_on_first_proxy?: true; check_writes_enable?: true; read_your_writes_disable?: true; read_ahead_disable?: true; durability_datacenter?: true; durability_risky?: true; durability_dev_null_is_web_scale?: true; priority_system_immediate?: true; priority_batch?: true; initialize_new_database?: true; access_system_keys?: true; read_system_keys?: true; debug_dump?: true; debug_retry_logging?: string; transaction_logging_enable?: string; timeout?: number; retry_limit?: number; max_retry_delay?: number; snapshot_ryw_enable?: true; snapshot_ryw_disable?: true; lock_aware?: true; used_during_commit_protection_disable?: true; read_lock_aware?: true; first_in_batch?: true; }; export declare enum TransactionOptionCode { CausalWriteRisky = 10, CausalReadRisky = 20, CausalReadDisable = 21, NextWriteNoWriteConflictRange = 30, CommitOnFirstProxy = 40, CheckWritesEnable = 50, ReadYourWritesDisable = 51, ReadAheadDisable = 52, DurabilityDatacenter = 110, DurabilityRisky = 120, DurabilityDevNullIsWebScale = 130, PrioritySystemImmediate = 200, PriorityBatch = 201, InitializeNewDatabase = 300, AccessSystemKeys = 301, ReadSystemKeys = 302, DebugDump = 400, DebugRetryLogging = 401, TransactionLoggingEnable = 402, Timeout = 500, RetryLimit = 501, MaxRetryDelay = 502, SnapshotRywEnable = 600, SnapshotRywDisable = 601, LockAware = 700, UsedDuringCommitProtectionDisable = 701, ReadLockAware = 702, FirstInBatch = 710 } export declare enum StreamingMode { WantAll = -2, Iterator = -1, Exact = 0, Small = 1, Medium = 2, Large = 3, Serial = 4 } export declare enum MutationType { Add = 2, And = 6, BitAnd = 6, Or = 7, BitOr = 7, Xor = 8, BitXor = 8, AppendIfFits = 9, Max = 12, Min = 13, SetVersionstampedKey = 14, SetVersionstampedValue = 15, ByteMin = 16, ByteMax = 17 } export declare enum ConflictRangeType { Read = 0, Write = 1 } export declare enum ErrorPredicate { Retryable = 50000, MaybeCommitted = 50001, RetryableNotCommitted = 50002 } export declare const networkOptionData: OptionData; export declare const databaseOptionData: OptionData; export declare const transactionOptionData: OptionData;