|
◆ dbasession_init()
recursive type(dbasession) function dballe_class::dbasession_init |
( |
type(dbaconnection), intent(in), optional |
connection, |
|
|
character (len=*), intent(in), optional |
anaflag, |
|
|
character (len=*), intent(in), optional |
dataflag, |
|
|
character (len=*), intent(in), optional |
attrflag, |
|
|
character (len=*), intent(in), optional |
filename, |
|
|
character (len=*), intent(in), optional |
mode, |
|
|
character(len=*), intent(in), optional |
format, |
|
|
character (len=*), intent(in), optional |
template, |
|
|
logical, intent(in), optional |
write, |
|
|
logical, intent(in), optional |
wipe, |
|
|
character(len=*), intent(in), optional |
repinfo, |
|
|
logical, intent(in), optional |
simplified, |
|
|
logical, intent(in), optional |
memdb, |
|
|
logical, intent(in), optional |
loadfile, |
|
|
character(len=*), intent(in), optional |
categoryappend |
|
) |
| |
|
private |
Constructor Without parameter it is initialized to missing.
- Parametri
-
[in] | connection | dballe connection |
[in] | anaflag | controls access to pseudoana records and can have these values "read": pseudoana records cannot be modified; "write": pseudoana records can be added and removed. |
[in] | dataflag | control access to observed data and can have these values "read": data cannot be modified in any way; "add": data can be added to the database, but existing data cannot be modified. Deletions are disabled. This is used to insert new data in the database while preserving the data that was already present in it; "write": data can freely be added, overwritten and deleted. |
[in] | attrflag | controls access to data attributes and can have these values "read": attributes cannot be modified in any way; "write": attributes can freely be added, overwritten and deleted. Note that some combinations are illegal, such as pseudoana=read and data=add (when adding a new data, it's sometimes necessary to insert new pseudoana records), or data=rewrite and attr=read (when deleting data, their attributes are deleted as well). |
[in] | filename | optional file name to use |
[in] | mode | "r"/"w"/"a" the open mode ("r" for read, "w" for write or create, "a" for append) |
[in] | template | template to use for write on file |
[in] | write | enable write on DSN/file ( default=.false. ) |
[in] | wipe | clean DSN/file and initialize it ( default=.false. ) |
[in] | repinfo | optional file repinfo.csv to use with wipe ( default="" ) |
[in] | format | the file format. It can be "BUFR", "CREX" or "JSON". (default="BUFR") |
[in] | simplified | rappresentation for interpreted message (simplified/precise) |
[in] | memdb | if true set a memdb ready for import data from file (default=true if filename present else false) |
[in] | loadfile | if true import from file to memdb (default=true if filename present else false) |
[in] | categoryappend | name to append to namespace category of log4fortran |
Definizione alla linea 4008 del file dballe_class.F03.
4008 if (lmode == "r") then 4009 call dbasession_init%messages_open_input(filename=filename,mode=lmode,& 4010 format=lformat,simplified=lsimplified) 4013 read_next = dbasession_init%messages_read_next() 4014 do while (read_next) 4015 read_next = dbasession_init%messages_read_next() 4020 call dbasession_init%messages_open_output(filename=filename,& 4021 mode=lmode,format=lformat) 4027 ier = idba_messaggi(dbasession_init%sehandle,filename, lmode, lformat) 4033 ier = idba_preparati(connection%dbhandle,dbasession_init%sehandle, lanaflag, ldataflag, lattrflag) 4034 if (lwipe)ier=idba_scopa(dbasession_init%sehandle,lrepinfo) 4038 dbasession_init%file=lfile 4039 if (dbasession_init%file) dbasession_init%filename=filename 4040 dbasession_init%mode=lmode 4041 dbasession_init%format=lformat 4042 dbasession_init%simplified=lsimplified 4043 dbasession_init%memdb=lmemdb 4044 dbasession_init%loadfile=lloadfile 4045 dbasession_init%template=ltemplate 4058 end function dbasession_init 4062 subroutine dbasession_unsetall(session) 4063 class(dbasession), intent(in) :: session 4066 if (c_e(session%sehandle)) then 4067 ier = idba_unsetall(session%sehandle) 4070 end subroutine dbasession_unsetall 4074 subroutine dbasession_remove_all(session) 4075 class(dbasession), intent(in) :: session 4078 if (c_e(session%sehandle)) then 4079 ier = idba_remove_all(session%sehandle) 4082 end subroutine dbasession_remove_all 4086 subroutine dbasession_prendilo(session) 4087 class(dbasession), intent(in) :: session 4090 if (c_e(session%sehandle)) then 4091 ier = idba_prendilo(session%sehandle) 4094 end subroutine dbasession_prendilo 4097 subroutine dbasession_var_related(session,btable) 4098 class(dbasession), intent(in) :: session 4099 character(len=*), INTENT(IN) :: btable 4102 if (c_e(session%sehandle)) then 4103 ier = idba_set(session%sehandle, "*var_related",btable) 4106 end subroutine dbasession_var_related 4109 subroutine dbasession_setcontextana(session) 4110 class(dbasession), intent(in) :: session 4113 if (c_e(session%sehandle)) then 4114 ier = idba_setcontextana(session%sehandle) 4117 end subroutine dbasession_setcontextana 4120 subroutine dbasession_dimenticami(session) 4121 class(dbasession), intent(in) :: session 4124 if (c_e(session%sehandle)) then 4125 ier = idba_dimenticami(session%sehandle) 4128 end subroutine dbasession_dimenticami 4131 subroutine dbasession_critica(session) 4132 class(dbasession), intent(in) :: session 4135 if (c_e(session%sehandle)) then 4136 ier = idba_critica(session%sehandle) 4139 end subroutine dbasession_critica 4142 subroutine dbasession_scusa(session) 4143 class(dbasession), intent(in) :: session 4146 if (c_e(session%sehandle)) then 4147 ier = idba_scusa(session%sehandle) 4150 end subroutine dbasession_scusa 4153 subroutine dbasession_set(session,metadata,datav,data,datetime,ana,network,level,timerange,filter) 4154 class(dbasession), intent(in) :: session 4155 type(dbametadata), optional :: metadata 4156 class(dbadcv), optional :: datav 4157 class(dbadata), optional :: data 4158 type(dbadatetime), optional :: datetime 4159 type(dbaana), optional :: ana 4160 type(dbanetwork), optional :: network 4161 type(dbalevel), optional :: level 4162 type(dbatimerange), optional :: timerange 4163 type(dbafilter), optional :: filter 4165 if ( present(metadata)) then 4166 call metadata%dbaset(session) 4169 if ( present(datetime)) then 4170 call datetime%dbaset(session) 4173 if ( present(ana)) then 4174 call ana%dbaset(session) 4177 if ( present(network)) then 4178 call network%dbaset(session) 4181 if ( present(level)) then 4182 call level%dbaset(session) 4185 if ( present(timerange)) then 4186 call timerange%dbaset(session) 4189 if ( present(datav)) then 4190 call datav%dbaset(session) 4193 if ( present(data)) then 4194 call data%dbaset(session) 4197 if ( present(filter)) then 4198 call filter%dbaset(session) 4201 end subroutine dbasession_set
|