8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:03:02 +01:00

Misc enhancements in user management - thanks to Adriano

This commit is contained in:
alexpeshkoff 2013-12-26 10:59:25 +00:00
parent 0e3243ef78
commit 35c23e7086
4 changed files with 15 additions and 15 deletions

View File

@ -105,9 +105,9 @@ bool Message::checkType<ISC_QUAD>(unsigned t, unsigned sz)
}
template <>
bool Message::checkType<bool>(unsigned t, unsigned sz)
bool Message::checkType<FB_BOOLEAN>(unsigned t, unsigned sz)
{
return t == SQL_BOOLEAN && sz == sizeof(bool);
return t == SQL_BOOLEAN && sz == sizeof(FB_BOOLEAN);
}

View File

@ -47,7 +47,7 @@ const unsigned int SZ_NAME = 31;
typedef Field<Varying> Varfield;
typedef Field<Text> Name;
typedef Field<ISC_QUAD> Blob;
typedef Field<bool> Boolean;
typedef Field<FB_BOOLEAN> Boolean;
} // anonymous namespace

View File

@ -1841,11 +1841,11 @@ public:
Firebird::ObjectsArray<Property> properties;
const Firebird::MetaName name;
const Firebird::string* password;
const Firebird::string* firstName;
const Firebird::string* middleName;
const Firebird::string* lastName;
const Firebird::string* comment;
Firebird::string* password;
Firebird::string* firstName;
Firebird::string* middleName;
Firebird::string* lastName;
Firebird::string* comment;
Nullable<int> adminRole;
Nullable<int> active;
Mode mode;

View File

@ -5886,13 +5886,13 @@ user_fixed_list($node)
%type user_fixed_opt(<createAlterUserNode>)
user_fixed_opt($node)
: FIRSTNAME utf_string { $node->firstName = $2; }
| MIDDLENAME utf_string { $node->middleName = $2; }
| LASTNAME utf_string { $node->lastName = $2; }
| GRANT ADMIN ROLE { $node->adminRole = Nullable<int>::val(1); }
| REVOKE ADMIN ROLE { $node->adminRole = Nullable<int>::val(0); }
| ACTIVE { $node->active = Nullable<int>::val(1); }
| INACTIVE { $node->active = Nullable<int>::val(0); }
: FIRSTNAME utf_string { setClause($node->firstName, "FIRSTNAME", $2); }
| MIDDLENAME utf_string { setClause($node->middleName, "MIDDLENAME", $2); }
| LASTNAME utf_string { setClause($node->lastName, "LASTNAME", $2); }
| GRANT ADMIN ROLE { setClause($node->adminRole, "ADMIN ROLE", Nullable<int>(1)); }
| REVOKE ADMIN ROLE { setClause($node->adminRole, "ADMIN ROLE", Nullable<int>(0)); }
| ACTIVE { setClause($node->active, "ACTIVE/INACTIVE", Nullable<int>(1)); }
| INACTIVE { setClause($node->active, "ACTIVE/INACTIVE", Nullable<int>(0)); }
;
%type user_var_opts(<createAlterUserNode>)