var searchIndex = {}; searchIndex["rustorm"] = {"doc":"Rustorm is a simple ORM implemented in rust.","items":[[0,"em","rustorm","",null,null],[3,"EntityManager","rustorm::em","A higher level API for manipulating objects in the database\nThis serves as a helper function for the query api",null,null],[12,"db","","",0,null],[11,"new","","Create an entity manager with the database connection provided",0,{"inputs":[{"name":"database"}],"output":{"name":"self"}}],[11,"delete","","delete records of this table",0,null],[11,"get_all","","get all the records of this table",0,null],[11,"get_all_only_columns","","get all the records of this table, but return only the columns mentioned",0,null],[11,"get_all_ignore_columns","","get all the records of this table, ignoring the columns listed, mentioned the other else",0,null],[11,"get_all_distinct","","get all the distinct records of this table",0,null],[11,"get_all_with_filter","","get all the records on this table which passed thru the filters\nany query that specified more than the parameters should use the query api",0,null],[11,"get_one","","get the first records of this table that passed thru the filters",0,null],[11,"get_exact","","",0,null],[11,"insert","","[FIXME] The arrangement of columns are off",0,null],[11,"insert_with_ignore_columns","","insert this record on the database, ignoring some columns\nwhich are set by the database default\ncolumns that are ignored are set by the database automatically",0,null],[11,"insert_ignore_defaulted_columns","","insert this record on the database, explicitly setting the defaults of the columns\nit may produce the same result with insert_with_ignore_columns\nthe query is different since it may mentions `created` now(),",0,null],[11,"reset","","this is called when there is a problem with the transaction",0,null],[11,"rollback","","when there is a problem with the transaction process, this can be called",0,null],[11,"update","","update the Dao, return the updated Dao",0,null],[11,"update_ignore_columns","","update the Dao, return the updated Dao\nignored columns will remain unchanged",0,null],[11,"update_only_columns","","update the Dao, return the updated Dao\nonly the columns specified, the rest is unchanged",0,null],[11,"update_ignore_defaulted_columns","","update the Dao, return the updated Dao\nthe default columns will be reset to whatever the db's default function will come up.\nie. updated column will be defaulted everytime a record is updated.",0,null],[11,"update_with_filter","","update the Dao with filter, return the updated Dao",0,null],[11,"save","","whether to use insert or update\ninsert when it is a new record\nupdate when it is an existing recor\nmay use UPSERT in newer versions of postgres\nmay use MERGE in oracle, mssql",0,null],[0,"query","rustorm","",null,null],[3,"Join","rustorm::query","",null,null],[12,"modifier","","",1,null],[12,"join_type","","",1,null],[12,"table_name","","",1,null],[12,"column1","","",1,null],[12,"column2","","",1,null],[3,"Order","","",null,null],[12,"operand","","",2,null],[12,"direction","","",2,null],[12,"nulls_where","","",2,null],[3,"Function","","function in a sql statement",null,null],[12,"function","","",3,null],[12,"params","","",3,null],[3,"Condition","","expression has left operand,\nequality and right operand",null,null],[12,"left","","",4,null],[12,"equality","","",4,null],[12,"right","","",4,null],[3,"Filter","","",null,null],[12,"connector","","",5,null],[12,"condition","","TODO: maybe renamed to LHS, supports functions and SQL",5,null],[12,"sub_filters","","",5,null],[3,"ColumnName","","",null,null],[12,"column","","",6,null],[12,"table","","",6,null],[12,"schema","","",6,null],[3,"Field","","",null,null],[12,"operand","","the field",7,null],[12,"name","","when renamed as field",7,null],[3,"TableName","","",null,null],[12,"schema","","",8,null],[12,"name","","",8,null],[12,"columns","","optional columns needed when rename for conflicting columns are needed",8,null],[3,"Page","","",null,null],[12,"page","","",9,null],[12,"page_size","","",9,null],[3,"Limit","","",null,null],[12,"limit","","",10,null],[12,"offset","","",10,null],[3,"Query","","",null,null],[12,"sql_type","","sql type determine which type of query to form, some fields are not applicable to other types of query",11,null],[12,"distinct","","whether to select the records distinct",11,null],[12,"enumerate_all","","whether to enumate all columns in involved models",11,null],[12,"declared_query","","",11,null],[12,"enumerated_fields","","fields can be functions, column sql query, and even columns\nTODO; merge enumerated column to this, add a builder for fields",11,null],[12,"distinct_on_columns","","specify to use distinct ON set of columns",11,null],[12,"from","","where the focus of values of column selection\nthis is the table to insert to, update to delete, create, drop\nwhe used in select, this is the\npub from_table:Option<TableName>,\nfrom field, where field can be a query, table, column, or function",11,null],[12,"joins","","joining multiple tables",11,null],[12,"filters","","filter records, ~ where statement of the query",11,null],[12,"order_by","","ordering of the records via the columns specified\nTODO: needs to support expressions/functions too",11,null],[12,"group_by","","grouping columns to create an aggregate",11,null],[12,"having","","having field,",11,null],[12,"excluded_columns","","exclude the mention of the columns in the SQL query, useful when ignoring changes in update/insert records",11,null],[12,"range","","caters both limit->offset and page->page_size\nsetting page and page_size can not interchange the order",11,null],[12,"values","","The data values, used in bulk inserting, updating,",11,null],[12,"enumerated_returns","","the returning clause of the query when supported,",11,null],[4,"JoinType","","",null,null],[13,"CROSS","","",12,null],[13,"INNER","","",12,null],[13,"OUTER","","",12,null],[13,"NATURAL","","",12,null],[4,"Modifier","","",null,null],[13,"LEFT","","",13,null],[13,"RIGHT","","",13,null],[13,"FULL","","",13,null],[4,"Direction","","",null,null],[13,"ASC","","",14,null],[13,"DESC","","",14,null],[4,"NullsWhere","","",null,null],[13,"FIRST","","",15,null],[13,"LAST","","",15,null],[4,"Connector","","",null,null],[13,"And","","",16,null],[13,"Or","","",16,null],[4,"Equality","","",null,null],[13,"EQ","","",17,null],[13,"NEQ","","",17,null],[13,"LT","","",17,null],[13,"LTE","","",17,null],[13,"GT","","",17,null],[13,"GTE","","",17,null],[13,"IN","","",17,null],[13,"NOT_IN","","",17,null],[13,"LIKE","","",17,null],[13,"ILIKE","","",17,null],[13,"IS_NOT_NULL","","",17,null],[13,"IS_NULL","","",17,null],[4,"Operand","","Operands can be columns, functions, query or value types",null,null],[13,"ColumnName","","",18,null],[13,"TableName","","",18,null],[13,"Function","","",18,null],[13,"Query","","",18,null],[13,"Value","","",18,null],[13,"Vec","","",18,null],[4,"SqlType","","Could have been SqlAction",null,null],[13,"SELECT","","",19,null],[13,"INSERT","","",19,null],[13,"UPDATE","","",19,null],[13,"DELETE","","",19,null],[4,"Error","","Query Error",null,null],[13,"NoTableSpecified","","",20,null],[13,"NoColumnSpecified","","",20,null],[13,"SqlError","","",20,null],[4,"Range","","",null,null],[13,"Page","","",21,null],[13,"Limit","","",21,null],[8,"ToTableName","","convert str, IsTable to TableName",null,null],[10,"to_table_name","","",22,null],[11,"fmt","","",12,null],[11,"clone","","",12,null],[11,"fmt","","",13,null],[11,"clone","","",13,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",14,null],[11,"clone","","",14,null],[11,"fmt","","",15,null],[11,"clone","","",15,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"fmt","","",16,null],[11,"clone","","",16,null],[11,"fmt","","",17,null],[11,"clone","","",17,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"fmt","","",18,null],[11,"clone","","",18,null],[11,"fmt","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",5,null],[11,"clone","","",5,null],[11,"new","","user friendly, commonly use API",5,{"inputs":[{"name":"str"},{"name":"equality"},{"name":"tovalue"}],"output":{"name":"self"}}],[11,"with_value","","user friendly, commonly use API",5,{"inputs":[{"name":"str"},{"name":"equality"},{"name":"value"}],"output":{"name":"self"}}],[11,"bare_new","","not very commonly used, offers enough flexibility",5,{"inputs":[{"name":"operand"},{"name":"equality"},{"name":"operand"}],"output":{"name":"self"}}],[11,"is_null","","",5,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"is_not_null","","",5,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"and","","",5,null],[11,"or","","",5,null],[11,"or_filter","","",5,null],[11,"and_filter","","",5,null],[11,"fmt","","",19,null],[11,"clone","","",19,null],[11,"clone","","",6,null],[11,"fmt","","",6,null],[11,"decode","","",6,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",6,null],[11,"fmt","","",7,null],[11,"clone","","",7,null],[11,"from_str","","",6,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"complete_name","","table name and column name",6,null],[11,"super_complete_name","","includes the schema, table name and column name",6,null],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"clone","","",8,null],[11,"fmt","","",8,null],[11,"from_str","","",8,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"complete_name","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"fmt","","",8,null],[11,"fmt","","",9,null],[11,"eq","","",9,null],[11,"ne","","",9,null],[11,"default","","",9,{"inputs":[],"output":{"name":"page"}}],[11,"clone","","",9,null],[11,"fmt","","",10,null],[11,"eq","","",10,null],[11,"ne","","",10,null],[11,"default","","",10,{"inputs":[],"output":{"name":"limit"}}],[11,"clone","","",10,null],[11,"fmt","","",21,null],[11,"eq","","",21,null],[11,"ne","","",21,null],[11,"clone","","",21,null],[11,"fmt","","",11,null],[11,"clone","","",11,null],[11,"new","","the default query is select",11,{"inputs":[],"output":{"name":"self"}}],[11,"select","","",11,{"inputs":[],"output":{"name":"self"}}],[11,"insert","","",11,{"inputs":[],"output":{"name":"self"}}],[11,"update","","",11,{"inputs":[],"output":{"name":"self"}}],[11,"delete","","",11,{"inputs":[],"output":{"name":"self"}}],[11,"distinct","","add DISTINCT ie: SELECT DISTINCT",11,null],[11,"select_all","","",11,{"inputs":[],"output":{"name":"self"}}],[11,"enumerate_all","","",11,{"inputs":[],"output":{"name":"self"}}],[11,"all","","",11,null],[11,"column","","all enumerated columns shall be called from this\nany conflict of columns from some other table will be automatically renamed\ncolumns that are not conflicts from some other table,\nbut is the other conflicting column is not explicityly enumerated will not be renamed",11,null],[11,"columns","","",11,null],[11,"group_by","","",11,null],[11,"having","","",11,null],[11,"exclude_column","","exclude columns when inserting/updating data\nalso ignores the column when selecting records\nuseful for manipulating thin records by excluding huge binary blobs such as images",11,null],[11,"exclude_columns","","",11,null],[11,"distinct_on_columns","","",11,null],[11,"set_page","","when paging multiple records",11,null],[11,"set_page_size","","",11,null],[11,"limit","","",11,null],[11,"get_limit","","",11,null],[11,"from","","A more terse way to write the query\nonly 1 table is supported yet",11,null],[11,"only_from","","enumerate only the columns that is coming from this table\nthis will invalidate enumerate_all",11,null],[11,"from_table","","",11,null],[11,"into_","","`into` is used in rust, os settled with `into_`",11,null],[11,"into_table","","can not use into since it's rust .into built-in (owned)",11,null],[11,"table","","can be used in behalf of into_, from,",11,null],[11,"declare_query","","if the database support CTE declareted query i.e WITH,\nthen this query will be declared\nif database doesn't support WITH queries, then this query will be\nwrapped in the from_query\nbuild a builder for this",11,null],[11,"from_query","","a query to query from\nuse WITH (query) t1 SELECT from t1 declaration in postgresql, sqlite\nuse SELECT FROM (query) in oracle, mysql, others\nalias of the table",11,null],[11,"from_field","","",11,null],[11,"get_from_table","","",11,null],[11,"join","","join a table on this query",11,null],[11,"left_join_table","","join a table on this query",11,null],[11,"left_join","","",11,null],[11,"right_join_table","","",11,null],[11,"right_join","","",11,null],[11,"full_join_table","","",11,null],[11,"full_join","","",11,null],[11,"inner_join_table","","",11,null],[11,"inner_join","","",11,null],[11,"order_by","","",11,null],[11,"asc","","ascending orderby of this column",11,null],[11,"asc_nulls_first","","ascending orderby of this column",11,null],[11,"asc_nulls_last","","ascending orderby of this column",11,null],[11,"desc","","descending orderby of this column",11,null],[11,"desc_nulls_first","","descending orderby of this column",11,null],[11,"desc_nulls_last","","descending orderby of this column",11,null],[11,"get_involved_tables","","",11,null],[11,"finalize","","preprocess the missing fields of the query,\nsuch as mentioning the columns of the from_table\nenumerate the columns of the involved tables\nskipping those which are explicitly ignored\nthe query will then be built and ready to be executed\nTODO: renamed conflicting enumerated columns\nif no enumerated fields and no excluded columns\ndo a select all",11,null],[11,"get_renamed_columns","","return the list of renamed columns, used in dao conversion to struc types",11,null],[11,"get_enumerated_columns","","return the list of enumerated columns\nwill be used for updating records",11,null],[11,"add_filter","","",11,null],[11,"add_filters","","",11,null],[11,"filter","","",11,null],[11,"and","","",11,null],[11,"or","","",11,null],[11,"filter_eq","","column = value",11,null],[11,"filter_lt","","column < value",11,null],[11,"filter_lte","","column <= value",11,null],[11,"filter_gt","","column > value",11,null],[11,"filter_gte","","column <= value",11,null],[11,"add_value_operand","","",11,null],[11,"add_value","","",11,null],[11,"value","","",11,null],[11,"set","","set a value of a column when inserting/updating records",11,null],[11,"set_value","","",11,null],[11,"return_all","","",11,null],[11,"returns","","",11,null],[11,"enumerate_column_as_return","","",11,null],[11,"build","","build the query only, not executed, useful when debugging",11,null],[11,"debug_build","","Warning: don't use this in production",11,null],[11,"retrieve","","retrieve a generic types, type is unknown at runtime\nexpects a return, such as select, insert/update with returning clause",11,null],[11,"retrieve_one","","expects a return, such as select, insert/update with returning clause\nno casting of data to structs is done\nThis is used when retrieving multiple models in 1 query, then casting the records to its equivalent structs",11,null],[11,"execute","","delete, update without caring for the return",11,null],[11,"collect","","execute the query, then convert the result",11,null],[11,"collect_one","","execute the query then collect only 1 record",11,null],[0,"dao","rustorm","",null,null],[3,"DaoResult","rustorm::dao","meta result of a query useful when doing complex query, and also with paging\nTODO: good name: DaoRows",null,null],[12,"dao","","",23,null],[12,"renamed_columns","","renamed columns for each table\nie. product => [(name, product_name),..];",23,null],[12,"total","","the total number of records",23,null],[12,"page","","page of the query",23,null],[12,"page_size","","page size",23,null],[3,"SerDaoResult","","a serializable array of dao to be serialized to json request\na utility struct to hold only the needed fields from DaoResult that is needed\nin serializing the object, the non-significant ones are not included such as the renamed_columns\nTODO: add Decodable",null,null],[12,"dao","","",24,null],[12,"total","","",24,null],[12,"page","","",24,null],[12,"page_size","","",24,null],[3,"Dao","","TODO: optimization, used enum types for the key values\nThis will save allocation of string to enum keys which is a few bytes, int",null,null],[12,"values","","",25,null],[4,"Type","","supported generic datatypes for an ORM",null,null],[13,"Bool","","",26,null],[13,"I8","","",26,null],[13,"I16","","",26,null],[13,"I32","","",26,null],[13,"I64","","",26,null],[13,"U8","","",26,null],[13,"U16","","",26,null],[13,"U32","","",26,null],[13,"U64","","",26,null],[13,"F32","","",26,null],[13,"F64","","",26,null],[13,"String","","",26,null],[13,"VecU8","","",26,null],[13,"Object","","",26,null],[13,"Json","","",26,null],[13,"Uuid","","",26,null],[13,"DateTime","","",26,null],[13,"NaiveDate","","",26,null],[13,"NaiveTime","","",26,null],[13,"NaiveDateTime","","",26,null],[13,"None","","",26,null],[4,"Value","","supported generic datatypes for an ORM",null,null],[13,"Bool","","",27,null],[13,"I8","","",27,null],[13,"I16","","",27,null],[13,"I32","","",27,null],[13,"I64","","",27,null],[13,"U8","","",27,null],[13,"U16","","",27,null],[13,"U32","","",27,null],[13,"U64","","",27,null],[13,"F32","","",27,null],[13,"F64","","",27,null],[13,"String","","",27,null],[13,"VecU8","","",27,null],[13,"Object","","",27,null],[13,"Json","","",27,null],[13,"Uuid","","",27,null],[13,"DateTime","","",27,null],[13,"NaiveDate","","",27,null],[13,"NaiveTime","","",27,null],[13,"NaiveDateTime","","",27,null],[13,"None","","",27,null],[6,"ParseError","","",null,null],[8,"IsDao","","trait for converting dao to model\nsized and clonable",null,null],[10,"from_dao","","convert dao to an instance of the corresponding struct of the model\ntaking into considerating the renamed columns",28,{"inputs":[{"name":"dao"}],"output":{"name":"self"}}],[10,"to_dao","","convert from an instance of the struct to a dao representation\nto be saved into the database",28,null],[8,"ToCompact","","Ignore Column are columns that are redundant when displaying as API results",null,null],[10,"redundant_fields","","list of redundant fields that will be removed when doing a compact serialization",29,null],[10,"compact_map","","compact BTreeMap represetation",29,null],[10,"compact_dao","","compact dao representation",29,null],[10,"compact_json","","compact dao representation",29,null],[8,"ToValue","","rename to ToValue",null,null],[10,"to_db_type","","",30,null],[8,"FromValue","","",null,null],[10,"from_type","","",31,{"inputs":[{"name":"value"}],"output":{"name":"self"}}],[11,"fmt","","",26,null],[11,"clone","","",26,null],[11,"eq","","",26,null],[11,"to_str_repr","","get the string representation when used in rust code",26,null],[11,"fmt","","",27,null],[11,"clone","","",27,null],[11,"eq","","",27,null],[11,"ne","","",27,null],[11,"get_type","","",27,null],[11,"encode","","",27,null],[11,"to_json","","",27,null],[11,"fmt","","",27,null],[11,"fmt","","",23,null],[11,"encode","","",24,null],[11,"from_dao_result","","",24,{"inputs":[{"name":"daoresult"}],"output":{"name":"self"}}],[11,"encode","","",23,null],[11,"cast","","cast the dao to the specific struct instance\ndo not include if non nullable parts contains null",23,null],[11,"cast_one","","FIXME: should return an error when there are more than 1 to be casted",23,null],[11,"clone","","",25,null],[11,"fmt","","",25,null],[11,"from_str","","",25,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"from_str_one","","reconstruct a dao from json string value",25,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"encode","","",25,null],[11,"to_json","","",25,null],[11,"new","","",25,{"inputs":[],"output":{"name":"self"}}],[11,"set","","",25,null],[11,"set_null","","set to null the value of this column\nTODO: correct the Null value here",25,null],[11,"set_value","","",25,null],[11,"get_value","","",25,null],[11,"remove","","take the value and remove the content",25,null],[11,"get","","take the value but not removing the content",25,null],[11,"get_opt","","get optional value",25,null],[11,"as_ref","","get a reference of the type",25,null],[11,"as_map","","",25,null],[0,"database","rustorm","",null,null],[4,"SqlOption","rustorm::database","SqlOption, contains the info about the features and quirks of underlying database",null,null],[13,"UsesNumberedParam","","use the numbered parameters, as the case with rust-postgres",32,null],[13,"UsesQuestionMark","","sqlite, jdbc",32,null],[13,"SupportsReturningClause","","postgresql supports returning clause on insert and update",32,null],[13,"SupportsCTE","","support CTE (common table expression ie. WITH) (postgresql, sqlite)",32,null],[13,"SupportsInheritance","","supports inheritance (postgresql)",32,null],[13,"UsesSchema","","whether the database uses schema (postgresl, oracle)",32,null],[13,"ReturnMetaColumns","","wheter the returned rows in a query included Meta columns for easy extraction of records\n(postgres returns this), sqlite does not return meta columns, so you have to extract it by index yourself.",32,null],[4,"BuildMode","","specifies if the sql will be build in debug mode for debugging purposed",null,null],[13,"Debug","","build in debug mode",33,null],[13,"Standard","","build in standard mode",33,null],[4,"DbError","","",null,null],[13,"Error","","",34,null],[13,"PoolError","","",34,null],[13,"PlatformError","","",34,null],[8,"Database","","Generic Database interface\nThis is the database interface which will should be implemented to you the specifics of each database platform\nAt least all methods on this trait should be implemented for target deployment database\nA lower level API for manipulating objects in the database",null,null],[10,"version","","return the version of the database\nlower version of database has fewer supported features",35,null],[10,"begin","","begin database transaction",35,null],[10,"commit","","commit database transaction",35,null],[10,"rollback","","rollback data changes executed prior to calling the begin method",35,null],[10,"is_transacted","","determine if this transaction has been committed or rolledback",35,null],[10,"is_closed","","determine if the database connection closed",35,null],[10,"is_connected","","check if the database is still connected",35,null],[10,"close","","close the database connection",35,null],[10,"is_valid","","determine if the database connection is still valid",35,null],[10,"reset","","reset the database connection",35,null],[11,"select","","select\nreturns an array to the qualified records",35,null],[11,"insert","","insert\ninsert an object, returns the inserted Dao value\nincluding the value generated via the defaults",35,null],[10,"update","","update\nreturns the updated Dao",35,null],[10,"delete","","delete records\nreturns the number of deleted records",35,null],[11,"execute_with_return","","execute query with return dao,\nuse the enumerated column for data extraction when db doesn't support returning the records column names",35,null],[11,"execute_with_one_return","","execute query with 1 return dao",35,null],[11,"execute","","execute query with no return dao",35,null],[10,"execute_sql_with_return","","execute insert with returning clause, update with returning clause",35,null],[11,"execute_sql_with_one_return","","",35,null],[10,"execute_sql","","everything else, no required return other than error or affected number of records",35,null],[11,"build_query","","build a query, return the sql string and the parameters.\nuse by select to build the select query\nbuild all types of query\nTODO: need to supply the number of parameters where to start the numbering of the number parameters",35,null],[11,"build_operand","","build operand, i.e: columns, query, function, values",35,null],[11,"build_condition","","",35,null],[11,"build_field","","",35,null],[11,"build_filter","","",35,null],[11,"build_filters","","build the filter clause or the where clause of the query\nTODO: add the sub filters",35,null],[11,"build_enumerated_fields","","build the enumerated, distinct, *, columns",35,null],[11,"build_select","","build the select statment from the query object",35,null],[11,"build_insert","","TODO: when the number of values is greater than the number of columns\nwrap it into another set and make sure the values are in multiples of the the n columns\nhttp://www.postgresql.org/docs/9.0/static/dml-insert.html",35,null],[11,"build_update","","",35,null],[11,"build_delete","","",35,null],[10,"sql_options","","",35,null],[8,"DatabaseDDL","","Deployment Database should implement this trait,\nto enable automated installation of the app, regardless what database platform\nthe app is developed from.",null,null],[10,"create_schema","","The following methods involves DDL(Data definition language) operation\ncreate a database schema",36,null],[10,"drop_schema","","drop the database schema",36,null],[10,"create_table","","create a database table based on the Model Definition",36,null],[10,"build_create_table","","build sql for create table",36,null],[10,"rename_table","","rename table, in the same schema",36,null],[10,"drop_table","","drop table",36,null],[10,"set_foreign_constraint","","set the foreign key constraint of a table",36,null],[10,"set_primary_constraint","","set the primary key constraint of a table",36,null],[8,"DatabaseDev","","implement this for database that you use as your development platform, to extract meta data information\nabout the tables and their relationship to each other",null,null],[10,"get_table_sub_class","","Database interface use for the development process\napplicable to later version of postgresql where there is inheritance",37,null],[10,"get_parent_table","","",37,null],[10,"get_table_metadata","","Build the Table object based on the extracted meta data info from database\nThis is queries directly from the database, so this will be costly. Only used this on initialization processes",37,null],[10,"get_all_tables","","get all the tables in this database (schema, table, is_view)",37,null],[10,"get_inherited_columns","","get the inherited columns of this table",37,null],[10,"dbtype_to_rust_type","","get the equivalent postgresql database data type to rust data type\nreturns (module, type)",37,null],[10,"rust_type_to_dbtype","","",37,null],[11,"eq","","",32,null],[11,"eq","","",33,null],[11,"clone","","",33,null],[11,"fmt","","",34,null],[11,"new","","",34,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"description","","",34,null],[11,"cause","","",34,null],[11,"fmt","","",34,null],[11,"from","","",34,{"inputs":[{"name":"initializationerror"}],"output":{"name":"self"}}],[11,"from","","",34,{"inputs":[{"name":"platformerror"}],"output":{"name":"self"}}],[11,"from","","",34,{"inputs":[{"name":"regexerror"}],"output":{"name":"self"}}],[11,"from","","",34,{"inputs":[{"name":"pgerror"}],"output":{"name":"self"}}],[11,"from","","",34,{"inputs":[{"name":"pgconnecterror"}],"output":{"name":"self"}}],[11,"from","","",34,{"inputs":[{"name":"myerror"}],"output":{"name":"self"}}],[0,"platform","rustorm","",null,null],[4,"PlatformError","rustorm::platform","",null,null],[13,"PostgresError","","",38,null],[13,"PostgresConnectError","","",38,null],[13,"MySQLError","","",38,null],[0,"postgres","","",null,null],[3,"Postgres","rustorm::platform::postgres","",null,null],[12,"pool","","a connection pool is provided",39,null],[11,"new","","create an instance, but without a connection yet,\nuseful when just building sql queries specific to this platform\ninexpensive operation, so can have multiple instances",39,{"inputs":[],"output":{"name":"self"}}],[11,"with_pooled_connection","","",39,{"inputs":[{"name":"pooledconnection"}],"output":{"name":"self"}}],[11,"get_connection","","",39,null],[11,"version","","",39,null],[11,"begin","","",39,null],[11,"commit","","",39,null],[11,"rollback","","",39,null],[11,"is_transacted","","",39,null],[11,"is_closed","","",39,null],[11,"is_connected","","",39,null],[11,"close","","",39,null],[11,"is_valid","","",39,null],[11,"reset","","",39,null],[11,"sql_options","","return this list of options, supported features in the database\nTODO: make this features version specific\nhttp://www.postgresql.org/about/featurematrix/\nwriter CTE >= 9.1\nInheritance >= 9.0\nJSON >= 9.2\nJSONB >= 9.4\nReturning >= 8.2",39,null],[11,"update","","",39,null],[11,"delete","","",39,null],[11,"execute_sql_with_return","","",39,null],[11,"execute_sql","","generic execute sql which returns not much information,\nreturns only the number of affected records or errors\ncan be used with DDL operations (CREATE, DELETE, ALTER, DROP)",39,null],[11,"create_schema","","",39,null],[11,"drop_schema","","",39,null],[11,"create_table","","",39,null],[11,"build_create_table","","",39,null],[11,"rename_table","","",39,null],[11,"drop_table","","",39,null],[11,"set_foreign_constraint","","",39,null],[11,"set_primary_constraint","","",39,null],[11,"get_parent_table","","",39,null],[11,"get_table_sub_class","","",39,null],[11,"get_table_metadata","","",39,null],[11,"get_all_tables","","",39,null],[11,"get_inherited_columns","","",39,null],[11,"dbtype_to_rust_type","","get the rust data type names from database data type names\nwill be used in source code generation",39,null],[11,"rust_type_to_dbtype","","",39,null],[0,"mysql","rustorm::platform","",null,null],[3,"Mysql","rustorm::platform::mysql","",null,null],[11,"new","","",40,{"inputs":[],"output":{"name":"self"}}],[11,"with_pooled_connection","","",40,{"inputs":[{"name":"mypool"}],"output":{"name":"self"}}],[11,"version","","",40,null],[11,"begin","","",40,null],[11,"commit","","",40,null],[11,"rollback","","",40,null],[11,"is_transacted","","",40,null],[11,"is_closed","","",40,null],[11,"is_connected","","",40,null],[11,"close","","",40,null],[11,"is_valid","","",40,null],[11,"reset","","",40,null],[11,"sql_options","","return this list of options, supported features in the database",40,null],[11,"update","","",40,null],[11,"delete","","",40,null],[11,"execute_sql_with_return","","",40,null],[11,"execute_sql_with_one_return","","",40,null],[11,"execute_sql","","generic execute sql which returns not much information,\nreturns only the number of affected records or errors\ncan be used with DDL operations (CREATE, DELETE, ALTER, DROP)",40,null],[11,"create_schema","","",40,null],[11,"drop_schema","","",40,null],[11,"build_create_table","","",40,null],[11,"create_table","","",40,null],[11,"rename_table","","",40,null],[11,"drop_table","","",40,null],[11,"set_foreign_constraint","","",40,null],[11,"set_primary_constraint","","",40,null],[11,"get_parent_table","","",40,null],[11,"get_table_sub_class","","",40,null],[11,"get_table_metadata","","",40,null],[11,"get_all_tables","","",40,null],[11,"get_inherited_columns","","",40,null],[11,"dbtype_to_rust_type","","get the rust data type names from database data type names\nwill be used in source code generation",40,null],[11,"rust_type_to_dbtype","","",40,null],[11,"fmt","rustorm::platform","",38,null],[11,"description","","",38,null],[11,"cause","","",38,null],[11,"fmt","","",38,null],[11,"from","","",38,{"inputs":[{"name":"pgerror"}],"output":{"name":"self"}}],[11,"from","","",38,{"inputs":[{"name":"pgconnecterror"}],"output":{"name":"self"}}],[11,"from","","",38,{"inputs":[{"name":"myerror"}],"output":{"name":"self"}}],[0,"table","rustorm","",null,null],[3,"Foreign","rustorm::table","",null,null],[12,"schema","","",41,null],[12,"table","","",41,null],[12,"column","","",41,null],[3,"Column","","",null,null],[12,"name","","",42,null],[12,"data_type","","the generic data type, ie: u32, f64, string",42,null],[12,"db_data_type","","the database data type of this column, ie: int, numeric, character varying",42,null],[12,"is_primary","","",42,null],[12,"is_unique","","",42,null],[12,"default","","",42,null],[12,"comment","","",42,null],[12,"not_null","","",42,null],[12,"foreign","","",42,null],[12,"is_inherited","","determines if the column is inherited from the parent table",42,null],[3,"RefTable","","all referenced table used in context",null,null],[12,"table","","the table being referred",43,null],[12,"is_ext","","",43,null],[12,"is_has_one","","",43,null],[12,"is_has_many","","",43,null],[12,"is_direct","","",43,null],[3,"Table","","",null,null],[12,"schema","","which schema this belongs",44,null],[12,"name","","the table name",44,null],[12,"parent_table","","the parent table of this table when inheriting (>= postgresql 9.3)\n[FIXME] need to tell which schema this parent table belongs\nthere might be same table in different schemas",44,null],[12,"sub_table","","what are the other table that inherits this\n[FIXME] need to tell which schema this parent table belongs\nthere might be same table in different schemas",44,null],[12,"comment","","comment of this table",44,null],[12,"columns","","columns of this table",44,null],[12,"is_view","","views can also be generated",44,null],[8,"IsTable","","trait for table definition",null,null],[10,"table","","",45,{"inputs":[],"output":{"name":"table"}}],[11,"eq","","",41,null],[11,"ne","","",41,null],[11,"clone","","",41,null],[11,"fmt","","",41,null],[11,"from_str","","",41,{"inputs":[{"name":"str"},{"name":"str"}],"output":{"name":"self"}}],[11,"complete_table_name","","",41,null],[11,"clone","","",42,null],[11,"fmt","","",42,null],[11,"nullable","","",42,null],[11,"corrected_name","","some column names may be a rust reserve keyword, so have to correct them",42,null],[11,"displayname","","",42,null],[11,"condense_name","","shorten, compress the name based on the table it points to\nparent_organization_id becomes parent",42,null],[11,"fmt","","",42,null],[11,"eq","","",42,null],[11,"ne","","",42,null],[11,"member_name","","return the appropriate member name of this reference\nwhen used with the table in context\nwill have to use another name if the comed up name\nalready in the column names\n1. the concise name of the referred/referrring table\n2. the name of the referred/referring table\n3. the appended column_name and the table name\n4. the table_name appended with HasMany, or HasOne\n1:1, 1:M, M:M\n11, 1m mm",43,null],[11,"fmt","","",44,null],[11,"clone","","",44,null],[11,"default","","",44,{"inputs":[],"output":{"name":"table"}}],[11,"fmt","","",44,null],[11,"eq","","",44,null],[11,"ne","","",44,null],[11,"with_name","","create table with name",44,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"complete_name","","return the long name of the table using schema.table_name",44,null],[11,"struct_name","","capitalize the first later, if there is underscore remove it then capitalize the next letter",44,null],[11,"displayname","","get the display name of this table\nproduct_availability -> Product Availability",44,null],[11,"condensed_displayname","","get a shorter display name of a certain table\nwhen being refered to this table\nexample product.product_availability -> Availability\nuser.user_info -> Info",44,null],[11,"condensed_member_name","","get a condensed name of this table when used in contex with another table",44,null],[11,"has_column_name","","determine if this table has a colum named",44,null],[11,"get_column","","return the column of this table with the name",44,null],[11,"primary_columns","","return all the primary columns of this table",44,null],[11,"non_nullable_columns","","",44,null],[11,"uninherited_columns","","return all the columns of this table excluding the inherited columns",44,null],[11,"inherited_columns","","return all the inherited columns",44,null],[11,"is_primary","","check to see if the column is a primary or not\nthe Column.is_primary property is not reliable since it also list down the foreign key\nwhich makes it 2 entries in the table",44,null],[11,"are_primary_columns","","return true when all columns are primary columns\nfalse if at least 1 is not a primary column",44,null],[11,"unique_columns","","return all the unique keys of this table",44,null],[11,"foreign_columns","","",44,null],[11,"get_table","","return the first match of table name regardless of which schema it belongs to.\nget the table definition using the table name from an array of table object\n[FIXME] Needs to have a more elegant solution by using HashMap",44,null],[11,"referred_tables","","get all the tables that is referred by this table\nget has_one",44,null],[11,"referring_tables","","has_many_direct\nget all other tables that is refering to this table\nwhen any column of a table refers to this table\nget_has_many",44,null],[11,"get_all_applicable_reference","","all the referenced table of this table, this is used in building the structs as stubs or final model definitions\nit does not include the parent is this table is just an extension to it\nwhen a linker table, no applicable referenced is returned\nparent of extension tables are not returned",44,null],[11,"is_linker_table","","determine if this table is a linker table\nFIXME: make sure that there are 2 different tables referred to it",44,null],[11,"is_owned","","determines if the table is owned by some other table\nsay order_line is owned by orders\nwhich doesn't make sense to be a stand alone window on its own\ncharacteristic: if it has only 1 has_one which is its owning parent table\nand no other direct or indirect referring table",44,null],[11,"indirect_referring_tables","","has many indirect\nwhen there is a linker table, bypass the 1:1 relation to the linker table\nthen create a 1:M relation to the other linked table\nAlgorithmn: determine whether a table is a linker then get the other linked table\n *get all the referring table\n *for each table that refer to this table\n *if there are only 2 columns and is both primary\n and foreign key at the same time\n and 1 of which refer to the primary column of this table\n * then the other table that is refered is the indirect referring table\nreturns the table that is indirectly referring to this table and its linker table",44,null],[11,"extension_tables","","get referring tables, and check if primary columns of these referring table\nis the same set of the primary columns of this table\nit is just an extension table\n[FIXED]~~FIXME:~~ 2 primary 1 foreign should not be included as extension table\ncase for photo_sizes",44,null],[11,"is_extension_of","","determines if this table is just an extension of the table specified\nextension tables need not to contain a reference of their parent table",44,null],[11,"get_foreign_columns_to_table","","returns the columns of these table that is a foreign columns to the foreign table",44,null],[0,"writer","rustorm","",null,null],[3,"SqlFrag","rustorm::writer","sql fragment\nuse this for writing SQL statements",null,null],[12,"sql","","",46,null],[12,"params","","",46,null],[12,"sql_options","","",46,null],[12,"build_mode","","",46,null],[11,"fmt","","",46,null],[11,"new","","",46,{"inputs":[{"name":"vec"},{"name":"buildmode"}],"output":{"name":"self"}}],[11,"append","","",46,null],[11,"appendln","","",46,null],[11,"tab","","",46,null],[11,"tabs","","",46,null],[11,"ln","","",46,null],[11,"ln_tab","","",46,null],[11,"ln_tabs","","",46,null],[11,"comma","","",46,null],[11,"sp","","",46,null],[11,"spaces","","",46,null],[11,"left_river","","write the string, aligning to the left side of the middle space (river)",46,null],[11,"right_river","","write the string, aligning to the right side of the middle space (river), leaving the left with empty string",46,null],[11,"commasp","","",46,null],[11,"comment","","",46,null],[11,"parameter","","append parameter including the needed sql keywords",46,null],[0,"config","rustorm","",null,null],[3,"DbConfig","rustorm::config","",null,null],[12,"platform","","postgres, sqlite, mysql\nsome fields are optional since sqlite is not applicable for those",47,null],[12,"username","","",47,null],[12,"password","","",47,null],[12,"host","","localhost",47,null],[12,"port","","5432",47,null],[12,"database","","",47,null],[12,"ssl","","",47,null],[11,"fmt","","",47,null],[11,"eq","","",47,null],[11,"ne","","",47,null],[11,"clone","","",47,null],[11,"from_url","","TODO: get rid of the hacky way parsing database url\nhttps://github.com/servo/rust-url/issues/40",47,{"inputs":[{"name":"str"}],"output":{"name":"option"}}],[11,"get_url","","",47,null],[0,"pool","rustorm","",null,null],[4,"Platform","rustorm::pool","the sql builder for each of the database platform",null,null],[13,"Postgres","","",48,null],[13,"Oracle","","",48,null],[13,"Mysql","","",48,null],[4,"ManagedPool","","Postgres, Sqlite uses r2d2 connection manager,\nMysql has its own connection pooling",null,null],[13,"Postgres","","",49,null],[13,"Oracle","","",49,null],[13,"Mysql","","",49,null],[11,"as_ref","","",48,null],[11,"as_ddl","","",48,null],[11,"as_dev","","",48,null],[11,"init","","initialize the pool",49,{"inputs":[{"name":"str"},{"name":"usize"}],"output":{"name":"result"}}],[11,"connect","","a conection is created here",49,null],[11,"to_table_name","rustorm::table","contain the columns for later use when renaming is necessary",44,null]],"paths":[[3,"EntityManager"],[3,"Join"],[3,"Order"],[3,"Function"],[3,"Condition"],[3,"Filter"],[3,"ColumnName"],[3,"Field"],[3,"TableName"],[3,"Page"],[3,"Limit"],[3,"Query"],[4,"JoinType"],[4,"Modifier"],[4,"Direction"],[4,"NullsWhere"],[4,"Connector"],[4,"Equality"],[4,"Operand"],[4,"SqlType"],[4,"Error"],[4,"Range"],[8,"ToTableName"],[3,"DaoResult"],[3,"SerDaoResult"],[3,"Dao"],[4,"Type"],[4,"Value"],[8,"IsDao"],[8,"ToCompact"],[8,"ToValue"],[8,"FromValue"],[4,"SqlOption"],[4,"BuildMode"],[4,"DbError"],[8,"Database"],[8,"DatabaseDDL"],[8,"DatabaseDev"],[4,"PlatformError"],[3,"Postgres"],[3,"Mysql"],[3,"Foreign"],[3,"Column"],[3,"RefTable"],[3,"Table"],[8,"IsTable"],[3,"SqlFrag"],[3,"DbConfig"],[4,"Platform"],[4,"ManagedPool"]]}; initSearch(searchIndex);