package Grant;

use strict;
use XML;

use methods;

use members ( scalar => 'to',
            foldcase => 'type', );

sub sql_create {
	my ($this, $table) = @_;
	return qq{grant $this->{type} on $Table::QUOTE$table->{name}$Table::QUOTE to "$this->{to}"};
}

sub sql_drop {
	my ($this, $table) = @_;
	return qq{revoke $this->{type} on $Table::QUOTE$table->{name}$Table::QUOTE from "$this->{to}"};
}

sub name {
	my ($this) = @_;
	return $this->{to} . " " . $this->{type};
}

1
