//-----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation.
//
//-----------------------------------------------------------------------
namespace Microsoft.Isam.Esent.Interop
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using Microsoft.Isam.Esent.Interop.Implementation;
///
/// Helper methods for the ESENT API. These methods deal with database
/// meta-data.
///
public static partial class Api
{
///
/// Starts and stops database defragmentation tasks that improves data
/// organization within a database.
///
/// The session to use for the call.
/// The database to be defragmented.
///
/// Under some options defragmentation is performed for the entire database described by the given
/// database ID, and other options (such as ) require
/// the name of the table to defragment.
///
/// Defragmentation options.
/// A warning code.
///
public static JET_wrn Defragment(
JET_SESID sesid,
JET_DBID dbid,
string tableName,
DefragGrbit grbit)
{
return Api.Check(Impl.Defragment(sesid, dbid, tableName, grbit));
}
}
}