Azavea.Open.DAO.SQL.SqlDaDdlLayer.SequenceExists C# (CSharp) Method

SequenceExists() public method

Returns whether a sequence with this name exists or not.
public SequenceExists ( string name ) : bool
name string Name of the sequence to check for.
return bool
        public virtual bool SequenceExists(string name)
        {
            int count = SqlConnectionUtilities.XSafeIntQuery(_connDesc,
                "SELECT COUNT(*) FROM information_schema.sequences where sequence_name = '" +
                name.ToLower() + "'", null);
            return count == 0;
        }