Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | stringValue | |||
character, | intent(in) | :: | stringType |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
FUNCTION CreateSQLiteStringTableRecord(stringValue,stringType) RESULT (iOut)
! FUNCTION INFORMATION:
! AUTHOR Kyle Benne
! DATE WRITTEN January 2010
! MODIFIED September 2010, Kyle Benne
! Modified FUNCTION syntax to use RESULT keyword
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This FUNCTION wites a record to the Strings table in the SQL database.
! The record's id is returned. If the string already exists in the table
! then the id of the existing record is returned.
! METHODOLOGY EMPLOYED:
! Standard SQL92 queries and commands via the Fortran SQLite3 API
! REFERENCES:
! na
! USE STATEMENTS:
USE ISO_C_FUNCTION_BINDING
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: stringValue
CHARACTER, INTENT(IN) :: stringType
INTEGER :: iOut
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: errcode
iOut = 0
errcode = SQLiteBindTextMacro(StringsLookUpStmt, 1, stringType)
errcode = SQLiteBindTextMacro(StringsLookUpStmt, 2, stringValue)
errcode = SQLiteStepCommand(StringsLookUpStmt)
IF (errcode .EQ. SQLITE_ROW) then
! If the stringKey is already in the database we just return its ID
iOut = SQLiteColumnIntMacro(StringsLookUpStmt,0)
ELSE
! If the stringKey is not already in the database we create a new record
! using the next available ID
errcode = SQLiteBindTextMacro(StringsInsertStmt, 1, stringType)
errcode = SQLiteBindTextMacro(StringsInsertStmt, 2, stringValue)
errcode = SQLiteStepCommand(StringsInsertStmt)
errcode = SQLiteResetCommand(StringsInsertStmt)
errcode = SQLiteClearBindings(StringsInsertStmt)
errcode = SQLiteResetCommand(StringsLookUpStmt)
errcode = SQLiteStepCommand(StringsLookUpStmt)
iOut = SQLiteColumnIntMacro(StringsLookUpStmt,0)
END IF
errcode = SQLiteResetCommand(StringsLookUpStmt)
errcode = SQLiteClearBindings(StringsLookUpStmt)
END FUNCTION CreateSQLiteStringTableRecord