InfiniSQL
v0.1.2-alpha
Massive Scale Transaction Processing
|
execute User Schema Manager actor More...
#include <UserSchemaMgr.h>
Public Member Functions | |
UserSchemaMgr (Topology::partitionAddress *myIdentityArg) | |
virtual | ~UserSchemaMgr () |
Public Attributes | |
class Message * | msgsnd |
int64_t | operationid |
int64_t | domainid |
int64_t | userid |
int64_t | status |
int64_t | tainstance |
class Message * | msgrcv |
REUSEMESSAGES domainidToSchemaMap | domainidsToSchemata |
class Mboxes | mboxes |
Topology::partitionAddress | myIdentity |
Private Member Functions | |
int64_t | getnextdomainid () |
generate unique, ever-increasing domain identifier More... | |
int64_t | getnextuserid (int64_t argdomainid) |
generate unique, ever-increasing user identifier More... | |
void | operationHandler (class MessageUserSchema &msgrcvref) |
perform operation (currently only login for SQL) More... | |
int64_t | operationLogin (string &username, string &domainname, string &password, int64_t *uid, int64_t *did) |
login for SQL session More... | |
void | login () |
login (raw interface) More... | |
void | changepassword () |
change password More... | |
void | createdomain () |
create domain More... | |
void | createuser () |
create user More... | |
void | deleteuser () |
delete user More... | |
void | deletedomain () |
delete domain More... | |
void | createschema (builtincmds_e cmd) |
create schema More... | |
void | createtable (builtincmds_e cmd) |
create table More... | |
void | addcolumn (builtincmds_e cmd) |
add column More... | |
void | deleteindex (builtincmds_e cmd) |
delete index More... | |
void | deletetable (builtincmds_e cmd) |
delete table More... | |
void | deleteschema (builtincmds_e cmd) |
delete schema More... | |
execute User Schema Manager actor
myIdentityArg | how to identify this |
Definition at line 62 of file UserSchemaMgr.h.
UserSchemaMgr::UserSchemaMgr | ( | Topology::partitionAddress * | myIdentityArg) |
Definition at line 33 of file UserSchemaMgr.cc.
References addcolumn(), Topology::partitionAddress::address, argsize, MessageUserSchema::userschema_s::argsize, Topology::partitionAddress::argstring, MessageUserSchema::argstring, BOOL, BUILTINADDCOLUMN, MessageUserSchema::userschema_s::builtincmd, BUILTINCREATESCHEMA, BUILTINCREATETABLE, BUILTINDELETEINDEX, BUILTINDELETESCHEMA, BUILTINDELETETABLE, changepassword(), CHAR, CHARX, passwordStruct::clearpassword, createdomain(), createschema(), createtable(), createuser(), deletedomain(), deleteindex(), deleteschema(), deletetable(), deleteuser(), passwordStruct::digest, domainid, MessageUserSchema::userschema_s::domainid, domainIdToNextUserId, domainIdToUserIds, domainIdToUserNames, domainNameToDomainId, fieldTypeMap, FLOAT, GETMSG, indexTypeMap, MessageUserSchema::userschema_s::instance, INT, logfile, login(), Topology::partitionAddress::mbox, mboxes, Message::messageStruct, msgpack2Vector(), msgrcv, msgsnd, myIdentity, myTopology, nextdomainid, Topology::addressStruct::nodeid, Mboxes::nodeid, NONE, NONUNIQUE, NONUNIQUENOTNULL, operationHandler(), operationid, MessageUserSchema::userschema_s::operationid, pwdStruct, resultVector, Mboxes::sendObBatch(), STARTCMD, tainstance, Message::message_s::topic, TOPIC_CHANGEPASSWORD, TOPIC_CREATEDOMAIN, TOPIC_CREATEUSER, TOPIC_DELETEDOMAIN, TOPIC_DELETEUSER, TOPIC_LOGIN, TOPIC_NONE, TOPIC_OPERATION, TOPIC_SCHEMAREQUEST, TOPIC_TOPOLOGY, UINT, UNIQUE, UNIQUENOTNULL, UNORDERED, UNORDEREDNOTNULL, Mboxes::update(), userid, MessageUserSchema::userschema_s::userid, MessageUserSchema::userschemaStruct, and VARCHAR.
|
virtual |
Definition at line 186 of file UserSchemaMgr.cc.
|
private |
add column
cmd | entry point for continuation |
Definition at line 606 of file UserSchemaMgr.cc.
References ABORTCMD, BUILTIN_STATUS_NOTOK, BUILTIN_STATUS_OK, CHARX, domainid, domainidsToSchemata, fieldTypeMap, indexTypeMap, logfile, Message::messageStruct, msgrcv, Table::name, resultVector, Message::message_s::sourceAddr, STARTCMD, status, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
change password
Definition at line 266 of file UserSchemaMgr.cc.
References domainid, domainIdToUserIds, domainIdToUserIdsIterator, Message::messageStruct, msgrcv, resultVector, Message::message_s::sourceAddr, userid, userIdToPassword, userIdToPasswordIterator, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
create domain
Definition at line 298 of file UserSchemaMgr.cc.
References domainid, domainIdToNextUserId, domainIdToUserIds, domainIdToUserNames, domainNameToDomainId, domainNameToDomainIdIterator, getnextdomainid(), Message::messageStruct, msgrcv, resultVector, Message::message_s::sourceAddr, userid, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
create schema
cmd | entry point for continuation |
Definition at line 528 of file UserSchemaMgr.cc.
References ABORTCMD, createSchema(), logfile, Message::messageStruct, msgrcv, Message::message_s::sourceAddr, STARTCMD, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
create table
cmd | entry point for continuation |
Definition at line 549 of file UserSchemaMgr.cc.
References ABORTCMD, BUILTIN_STATUS_NOTOK, BUILTIN_STATUS_OK, Schema::createTable(), domainid, domainidsToSchemata, Schema::getnexttableid(), logfile, Message::messageStruct, msgrcv, resultVector, Message::message_s::sourceAddr, STARTCMD, status, Schema::tableNameToId, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
create user
Definition at line 337 of file UserSchemaMgr.cc.
References passwordStruct::digest, domainid, domainIdToUserIds, domainIdToUserNames, domainIdToUserNamesIterator, domainNameToDomainId, domainNameToDomainIdIterator, getnextuserid(), Message::messageStruct, msgrcv, pwdStruct, resultVector, Message::message_s::sourceAddr, userid, userIdToPassword, userNameToUserId, userNameToUserIdIterator, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
delete domain
Definition at line 485 of file UserSchemaMgr.cc.
References domainid, domainIdToNextUserId, domainIdToUserIds, domainIdToUserNames, domainNameToDomainId, domainNameToDomainIdIterator, Message::messageStruct, msgrcv, resultVector, Message::message_s::sourceAddr, userid, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
delete index
cmd | entry point for continuation |
Definition at line 703 of file UserSchemaMgr.cc.
References ABORTCMD, BUILTIN_STATUS_OK, logfile, Message::messageStruct, msgrcv, Message::message_s::sourceAddr, STARTCMD, status, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
delete schema
cmd | entry point for continuation |
Definition at line 747 of file UserSchemaMgr.cc.
References ABORTCMD, BUILTIN_STATUS_OK, logfile, Message::messageStruct, msgrcv, Message::message_s::sourceAddr, STARTCMD, status, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
delete table
cmd | entry point for continuation |
Definition at line 725 of file UserSchemaMgr.cc.
References ABORTCMD, BUILTIN_STATUS_OK, logfile, Message::messageStruct, msgrcv, Message::message_s::sourceAddr, STARTCMD, status, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
delete user
Definition at line 405 of file UserSchemaMgr.cc.
References domainid, domainIdToUserIds, domainIdToUserIdsIterator, domainIdToUserNames, domainIdToUserNamesIterator, domainNameToDomainId, domainNameToDomainIdIterator, Message::messageStruct, msgrcv, resultVector, Message::message_s::sourceAddr, userid, userIdToPassword, userNameToUserId, userNameToUserIdIterator, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
generate unique, ever-increasing domain identifier
Definition at line 769 of file UserSchemaMgr.cc.
References nextdomainid.
Referenced by createdomain().
|
private |
generate unique, ever-increasing user identifier
Definition at line 774 of file UserSchemaMgr.cc.
References domainIdToNextUserId, and domainIdToNextUserIdIterator.
Referenced by createuser().
|
private |
login (raw interface)
Definition at line 197 of file UserSchemaMgr.cc.
References passwordStruct::digest, domainid, domainIdToUserIds, domainIdToUserNames, domainIdToUserNamesIterator, MessageUserSchema::domainname, domainNameToDomainId, domainNameToDomainIdIterator, Message::messageStruct, msgrcv, pwdStruct, resultVector, Message::message_s::sourceAddr, userid, userIdToPassword, userIdToPasswordIterator, userNameToUserId, userNameToUserIdIterator, and TransactionAgent::usmReply().
Referenced by UserSchemaMgr().
|
private |
perform operation (currently only login for SQL)
msgrcvref | received MessageUserSchema |
Definition at line 788 of file UserSchemaMgr.cc.
References Topology::partitionAddress::address, MessageUserSchema::userschema_s::caller, MessageUserSchema::userschema_s::callerstate, MessageUserSchema::domainname, mboxes, Message::messageStruct, myIdentity, OPERATION_LOGIN, MessageUserSchema::userschema_s::operationid, operationLogin(), MessageUserSchema::userschema_s::operationtype, MessageUserSchema::password, Message::message_s::sourceAddr, Mboxes::toActor(), MessageUserSchema::username, and MessageUserSchema::userschemaStruct.
Referenced by UserSchemaMgr().
|
private |
login for SQL session
username | user name |
domainname | domain name (PostgreSQL dbname) |
password | password (clear) |
uid | userid |
did | domainid |
Definition at line 820 of file UserSchemaMgr.cc.
References passwordStruct::digest, domainIdToUserIds, domainIdToUserNames, domainNameToDomainId, pwdStruct, STATUS_NOTOK, and STATUS_OK.
Referenced by operationHandler().
|
private |
Definition at line 186 of file UserSchemaMgr.h.
Referenced by UserSchemaMgr().
int64_t UserSchemaMgr::domainid |
Definition at line 71 of file UserSchemaMgr.h.
Referenced by addcolumn(), changepassword(), createdomain(), createtable(), createuser(), deletedomain(), deleteuser(), login(), and UserSchemaMgr().
REUSEMESSAGES domainidToSchemaMap UserSchemaMgr::domainidsToSchemata |
Definition at line 78 of file UserSchemaMgr.h.
Referenced by addcolumn(), and createtable().
|
private |
Definition at line 205 of file UserSchemaMgr.h.
|
private |
Definition at line 195 of file UserSchemaMgr.h.
Referenced by createdomain(), deletedomain(), getnextuserid(), and UserSchemaMgr().
|
private |
Definition at line 196 of file UserSchemaMgr.h.
Referenced by getnextuserid().
|
private |
Definition at line 193 of file UserSchemaMgr.h.
Referenced by changepassword(), createdomain(), createuser(), deletedomain(), deleteuser(), login(), operationLogin(), and UserSchemaMgr().
|
private |
Definition at line 194 of file UserSchemaMgr.h.
Referenced by changepassword(), and deleteuser().
|
private |
Definition at line 191 of file UserSchemaMgr.h.
Referenced by createdomain(), createuser(), deletedomain(), deleteuser(), login(), operationLogin(), and UserSchemaMgr().
|
private |
Definition at line 192 of file UserSchemaMgr.h.
Referenced by createuser(), deleteuser(), and login().
|
private |
Definition at line 189 of file UserSchemaMgr.h.
Referenced by createdomain(), createuser(), deletedomain(), deleteuser(), login(), operationLogin(), and UserSchemaMgr().
|
private |
Definition at line 190 of file UserSchemaMgr.h.
Referenced by createdomain(), createuser(), deletedomain(), deleteuser(), and login().
|
private |
Definition at line 206 of file UserSchemaMgr.h.
Referenced by addcolumn(), and UserSchemaMgr().
|
private |
Definition at line 207 of file UserSchemaMgr.h.
Referenced by addcolumn(), and UserSchemaMgr().
|
private |
Definition at line 187 of file UserSchemaMgr.h.
class Mboxes UserSchemaMgr::mboxes |
Definition at line 79 of file UserSchemaMgr.h.
Referenced by operationHandler(), and UserSchemaMgr().
class Message* UserSchemaMgr::msgrcv |
Definition at line 76 of file UserSchemaMgr.h.
Referenced by addcolumn(), changepassword(), createdomain(), createschema(), createtable(), createuser(), deletedomain(), deleteindex(), deleteschema(), deletetable(), deleteuser(), login(), and UserSchemaMgr().
class Message* UserSchemaMgr::msgsnd |
Definition at line 69 of file UserSchemaMgr.h.
Referenced by UserSchemaMgr().
Topology::partitionAddress UserSchemaMgr::myIdentity |
Definition at line 80 of file UserSchemaMgr.h.
Referenced by operationHandler(), and UserSchemaMgr().
|
private |
Definition at line 188 of file UserSchemaMgr.h.
|
private |
Definition at line 83 of file UserSchemaMgr.h.
Referenced by UserSchemaMgr().
|
private |
Definition at line 204 of file UserSchemaMgr.h.
Referenced by getnextdomainid(), and UserSchemaMgr().
int64_t UserSchemaMgr::operationid |
Definition at line 70 of file UserSchemaMgr.h.
Referenced by UserSchemaMgr().
|
private |
Definition at line 201 of file UserSchemaMgr.h.
Referenced by createuser(), login(), operationLogin(), and UserSchemaMgr().
|
private |
Definition at line 202 of file UserSchemaMgr.h.
|
private |
Definition at line 203 of file UserSchemaMgr.h.
Referenced by addcolumn(), changepassword(), createdomain(), createtable(), createuser(), deletedomain(), deleteuser(), login(), and UserSchemaMgr().
int64_t UserSchemaMgr::status |
Definition at line 73 of file UserSchemaMgr.h.
Referenced by addcolumn(), createtable(), deleteindex(), deleteschema(), and deletetable().
int64_t UserSchemaMgr::tainstance |
Definition at line 74 of file UserSchemaMgr.h.
Referenced by UserSchemaMgr().
int64_t UserSchemaMgr::userid |
Definition at line 72 of file UserSchemaMgr.h.
Referenced by changepassword(), createdomain(), createuser(), deletedomain(), deleteuser(), login(), and UserSchemaMgr().
|
private |
Definition at line 199 of file UserSchemaMgr.h.
Referenced by changepassword(), createuser(), deleteuser(), and login().
|
private |
Definition at line 200 of file UserSchemaMgr.h.
Referenced by changepassword(), and login().
|
private |
Definition at line 197 of file UserSchemaMgr.h.
Referenced by createuser(), deleteuser(), and login().
|
private |
Definition at line 198 of file UserSchemaMgr.h.
Referenced by createuser(), deleteuser(), and login().