Difference between revisions of "Python MySQL API"
Jump to navigation
Jump to search
(Outline of article) |
(→Common: update) |
||
Line 1: | Line 1: | ||
==Common== | ==Common== | ||
− | * SQLUpdateQueries() | + | * '''SQLUpdateQueries()''' - This function is executed whenever SQLparsing.py is imported. It's not intended for application use. |
− | + | * '''SQLgetDatabaseStatus()''' - This function can be called to obtain the current status of the database. 0=offline, 1=online. The value is changed through the moderator cpanel. | |
− | * SQLgetDatabaseStatus() | + | * '''SQLgetEditingStatus()''' - This function can be called to obtain the current editing status. 0=offline, 1=public editing, 2=moderator-only editing. The value is changed through the moderator cpanel. |
− | * SQLgetEditingStatus() | + | * '''SQLgetSchemaVersion()''' - Returns the current schema version. There is no standard for defining schema versions as yet, so this may be deprecated in the future. |
− | * SQLgetSchemaVersion() | + | * '''todaysDate()''' - This should probably be moved elsewhere, as it has nothing to do with the MySQL interface. |
− | * todaysDate() | + | * '''SQLgetNotes(note_id)''' - This function returns the note text associated with the note reocrd note_id. |
− | * SQLgetNotes( | + | * '''SQLgetUserName(userId)''' - This function returns the plain text user name associated with userId. |
− | * SQLgetUserName(userId) | + | * '''SQLisUserModerator(userId)''' - This function returns 1 of the userID is a moderator, otherwise it returns 0. |
− | * SQLisUserModerator(userId) | + | * '''SQLgetSubmitterID(submitter)''' - Given a plain text user name, this function returns the user_id. |
− | * SQLgetSubmitterID(submitter) | + | * '''SQLgetSubmitterName(submitter)''' - This appears to be a variant duplicate of SQLgetUserName(). This needs to be cleaned up. |
− | * SQLgetSubmitterName(submitter) | + | * '''SQLmarkIntegrated(db, recno, reviewerid)''' - This function marks the submmision recno approved by reviewerid. This probably doesn't need db as an argument. |
− | * SQLmarkIntegrated(db, recno, reviewerid) | + | * '''SQLloadXML(recno)''' - This function loads the XML payload associated with a data submission. |
− | * SQLloadXML(recno) | + | * '''SQLloadState(recno)''' - This function loads the state of a data submission (N=new, I=integrated, R=rejected). |
− | * SQLloadState(recno) | + | * '''SQLwikiLinkExists(namespace, title)''' - Returns 1 if namespace:title exists as a page in the wiki, otherwise returns 0. |
− | * SQLwikiLinkExists(namespace, title): | ||
==Authors== | ==Authors== |
Revision as of 12:09, 1 June 2008
Common
- SQLUpdateQueries() - This function is executed whenever SQLparsing.py is imported. It's not intended for application use.
- SQLgetDatabaseStatus() - This function can be called to obtain the current status of the database. 0=offline, 1=online. The value is changed through the moderator cpanel.
- SQLgetEditingStatus() - This function can be called to obtain the current editing status. 0=offline, 1=public editing, 2=moderator-only editing. The value is changed through the moderator cpanel.
- SQLgetSchemaVersion() - Returns the current schema version. There is no standard for defining schema versions as yet, so this may be deprecated in the future.
- todaysDate() - This should probably be moved elsewhere, as it has nothing to do with the MySQL interface.
- SQLgetNotes(note_id) - This function returns the note text associated with the note reocrd note_id.
- SQLgetUserName(userId) - This function returns the plain text user name associated with userId.
- SQLisUserModerator(userId) - This function returns 1 of the userID is a moderator, otherwise it returns 0.
- SQLgetSubmitterID(submitter) - Given a plain text user name, this function returns the user_id.
- SQLgetSubmitterName(submitter) - This appears to be a variant duplicate of SQLgetUserName(). This needs to be cleaned up.
- SQLmarkIntegrated(db, recno, reviewerid) - This function marks the submmision recno approved by reviewerid. This probably doesn't need db as an argument.
- SQLloadXML(recno) - This function loads the XML payload associated with a data submission.
- SQLloadState(recno) - This function loads the state of a data submission (N=new, I=integrated, R=rejected).
- SQLwikiLinkExists(namespace, title) - Returns 1 if namespace:title exists as a page in the wiki, otherwise returns 0.
Authors
- SQLgetAuthorData(author):
- SQLloadAuthorData(author_id):
- SQLauthorIsPseudo(au_id):
- SQLauthorHasPseudo(au_id):
- SQLgetActualFromPseudo(au_id):
- SQLgetPseudoFromActual(au_id):
- SQLupdateViews(author_id):
- SQLloadEmails(author_id):
- SQLloadWebpages(author_id):
- SQLbornToday():
- SQLdiedToday():
- SQLgetAuthorVariants(author_id):
- SQLGetInterviews(author_id):
- SQLFindAuthors(target):
Titles
- SQLupdateTitleViews(title_id):
- SQLloadTitlesXBA(aurec, alpha, views, chron):
- SQLserialTitlesXBA(aurec, alpha, views):
- SQLloadLongTitlesXBA(aurec, alpha, views):
- SQLloadAnyTitles(aurec):
- SQLloadShortTitlesXBA(aurec, alpha, views):
- SQLloadTitlesXBT(recno):
- SQLloadIntervieweeXBA(author):
- SQLloadTitle(titlerec):
- SQLFindTitles(target):
- SQLCollaborators(author_id):
- SQLTitleCollaborators(title_id, author_id):
- SQLTitleAuthors(title_id):
- SQLInterviewAuthors(title_id):
- SQLReviewAuthors(title_id):
- SQLFindYear(target):
- SQLgetTitle(titleId):
- SQLgetTitleVariants(title_id):
- SQLgetSerialsByTitle(title):
- SQLFindReviewParent(title, author):
- SQLloadTitleReviews(title_id):
- SQLfindReviewedTitle(review_id):
Series
- SQLgetShortSeriesData(authorec):
- SQLgetEssaySeriesData(authorec):
- SQLget1Series(seriesrec):
- SQLgetNCSeriesData(authorec):
- SQLgetASeriesData(authorec):
- SQLgetESeriesData(authorec):
- SQLgetNFSeriesData(authorec):
- SQLFindSeries(target):
- SQLFindSeriesChildren(id):
- SQLgetSeriesName(id):
- SQLFindSeriesId(target):
- SQLFindSeriesName(target):
- SQLFindSeries2(target):
- SQLloadTitlesXBS(series):
Awards
- SQLloadTitleFromAward(award_id):
- SQLloadAwardsXBA(author):
- SQLloadAwardsXBY(year):
- SQLTitleAwards(title_id):
- SQLloadAwards(award_id):
Publications
- SQLGetForthcoming(month, year, day, all):
- SQLGetTodaysPubs(month, year, day, limit):
- SQLGetPubByTag(tag):
- SQLGetPubById(tag):
- SQLGetPubsByTitle(titlerec):
- SQLGetPubsByPublisherYear(publisher_id, year):
- SQLGetPubsByAuthor(aurec):
- SQLGetPubsByPublisherYear(publisher_id, year):
- SQLGetPubContentByAuthor(aurec):
- SQLFindPubsByIsbn(target):
- SQLPubAuthors(pub_id):
- SQLMarqueAuthors(pub_id):
- SQLgetTitleReferral(pub_id):
- SQLgetPubTitle(pubId):
- SQLGetPubContentList(pub_id):
- SQLRefList():
- SQLVerificationList(pub_id):
Publishers
- SQLGetPublisher(pubrec):
- SQLFindPublisher(target):
- SQLGetPublisherYears(publisher_id):
- SQLgetPublisherName(id):
- SQLloadPublisherWebpages(publisher_id):
User Tags
- SQLgetAuthorTags(author_id):
- SQLgetTitleTags(title_id):
- SQLgetUserTags(title_id, user_id):
- SQLGetTagById(tag_id):
- SQLgetPopularTags():
- SQLsearchTags(tag):