|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace pgstore
{
/// <summary>
/// This class is used to indicate parameters used to launch pg_dump aund pg_restore commnds
/// the parameters are initialized with the most common parameters
/// its could be changed if necessary to do a specific tasks
/// </summary>
public class StoreParameters
{
public StoreParameters()
{
DataOnly = false;
Blobs = true;
Clean = false;
Oids = false;
NoOwner = false;
SchemaOnly = false;
NoPrivileges = false;
}
public bool DataOnly { get; set; }
public bool Blobs { get; set; }
public bool Clean { get; set; }
public bool Oids { get; set; }
public bool NoOwner { get; set; }
public bool SchemaOnly { get; set; }
public bool NoPrivileges { get; set; }
public string DataOnlyCode { get { if (DataOnly) return " -a"; return ""; } }
public string BlobsCode { get { if (Blobs) return " -b"; return ""; } }
public string CleanCode { get { if (Clean && !DataOnly) return " -c"; return ""; } }
public string OidsCode { get { if (Oids) return " -o"; return ""; } }
public string NoOwnerCode { get { if (NoOwner) return " -O"; return ""; } }
public string SchemaOnlyCode { get { if (SchemaOnly) return " -s"; return ""; } }
public string NoPrivilegesCode { get { if (NoPrivileges) return " -x"; return ""; } }
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.