object DataBaseUnitServer: TDataBaseUnitServer
  OldCreateOrder = False
  Height = 388
  Width = 1158
  object FDConnection: TFDConnection
    Left = 48
    Top = 16
  end
  object FDPhysMySQLDriverLink: TFDPhysMySQLDriverLink
    Left = 112
    Top = 72
  end
  object qSelectFilesFromFolder: TFDQuery
    SQL.Strings = (
      'SELECT * FROM coffeetest_db.foldersandfilesonserver '
      ''
      'WHERE '
      ''
      'idParent=:idParent and '
      'users_id=:users_id;')
    Left = 288
    Top = 56
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end
      item
        Name = 'USERS_ID'
        ParamType = ptInput
      end>
  end
  object qInsertFolderOrFile: TFDQuery
    SQL.Strings = (
      'INSERT INTO `coffeetest_db`.`foldersandfilesonserver` '
      ''
      '( `idParent`, '
      '`name`,'
      '`relPath`,'
      '`absPath`,'
      '`creationDateTime`, '
      '`changesDateTime`, '
      '`lastAccessDateTime`, '
      '`isFolder`, '
      '`users_id`, '
      '`fileSize`,'
      '`fileType_id`'
      ') '
      ''
      'VALUES '
      ''
      '( '
      ':idParent, '
      ':name,'
      ':relPath,'
      ':absPath,'
      ':creationDateTime, '
      ':changesDateTime, '
      ':lastAccessDateTime,'
      ':isFolder, '
      ':users_id, '
      ':fileSize,'
      ':fileType_id'
      '); ')
    Left = 376
    Top = 96
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end
      item
        Name = 'NAME'
        ParamType = ptInput
      end
      item
        Name = 'RELPATH'
        ParamType = ptInput
      end
      item
        Name = 'ABSPATH'
        ParamType = ptInput
      end
      item
        Name = 'CREATIONDATETIME'
        ParamType = ptInput
      end
      item
        Name = 'CHANGESDATETIME'
        ParamType = ptInput
      end
      item
        Name = 'LASTACCESSDATETIME'
        ParamType = ptInput
      end
      item
        Name = 'ISFOLDER'
        ParamType = ptInput
      end
      item
        Name = 'USERS_ID'
        ParamType = ptInput
      end
      item
        Name = 'FILESIZE'
        ParamType = ptInput
      end
      item
        Name = 'FILETYPE_ID'
        ParamType = ptInput
      end>
  end
  object qDelete: TFDQuery
    SQL.Strings = (
      
        'DELETE FROM `coffeetest_db`.`foldersandfilesonserver` WHERE `id`' +
        '=:id;')
    Left = 592
    Top = 216
    ParamData = <
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qUpdateIdParent: TFDQuery
    SQL.Strings = (
      
        'UPDATE `coffeetest_db`.`foldersandfilesonserver` SET `idParent`=' +
        ':idParent WHERE `id`=:id;')
    Left = 504
    Top = 168
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qSelectWhereParent: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'SELECT * FROM coffeetest_db.foldersandfilesonserver WHERE `idPar' +
        'ent`=:idParent;')
    Left = 144
    Top = 264
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end>
  end
  object qUpdateUsers_id: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'UPDATE `coffeetest_db`.`foldersandfilesonserver` SET `users_id`=' +
        ':users_id WHERE `id`=:id;')
    Left = 224
    Top = 296
    ParamData = <
      item
        Name = 'USERS_ID'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qGetLastInsertedID: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'SELECT max(id) as lastInsertedID FROM coffeetest_db.foldersandfi' +
        'lesonserver;')
    Left = 88
    Top = 208
  end
  object qInsertFolderOrFileNullUsers_id: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'INSERT INTO `coffeetest_db`.`foldersandfilesonserver` '
      ''
      '('
      ''
      '`idParent`, '
      '`name`,'
      '`relPath`,'
      '`absPath`,'
      '`creationDateTime`, '
      '`changesDateTime`, '
      '`lastAccessDateTime`, '
      '`isFolder`, '
      '`fileSize`) '
      ''
      'VALUES '
      ''
      '( '
      ''
      ':idParent, '
      ':name,'
      ':relPath,'
      ':absPath,'
      ':creationDateTime, '
      ':changesDateTime, '
      ':lastAccessDateTime,'
      ':isFolder, '
      ':fileSize'
      ''
      '); ')
    Left = 392
    Top = 24
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end
      item
        Name = 'NAME'
        ParamType = ptInput
      end
      item
        Name = 'RELPATH'
        ParamType = ptInput
      end
      item
        Name = 'ABSPATH'
        ParamType = ptInput
      end
      item
        Name = 'CREATIONDATETIME'
        ParamType = ptInput
      end
      item
        Name = 'CHANGESDATETIME'
        ParamType = ptInput
      end
      item
        Name = 'LASTACCESSDATETIME'
        ParamType = ptInput
      end
      item
        Name = 'ISFOLDER'
        ParamType = ptInput
      end
      item
        Name = 'FILESIZE'
        ParamType = ptInput
      end>
  end
  object qSelectFileType: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'SELECT * FROM coffeetest_db.filetype')
    Left = 592
    Top = 56
  end
  object qInsertFileType: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'INSERT INTO `coffeetest_db`.`filetype` (`FileType`) VALUES (:Fil' +
        'eType);')
    Left = 792
    Top = 304
    ParamData = <
      item
        Name = 'FILETYPE'
        ParamType = ptInput
      end>
  end
  object qSelectFileTypeWhere: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'SELECT id FROM coffeetest_db.filetype where FileType=:FileType;')
    Left = 664
    Top = 104
    ParamData = <
      item
        Name = 'FILETYPE'
        ParamType = ptInput
      end>
  end
  object qSelectChildren: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'SELECT id FROM coffeetest_db.foldersandfilesonserver where idPar' +
        'ent=:idParent;')
    Left = 688
    Top = 184
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end>
  end
  object qGetAbsAdressByID: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'SELECT absPath FROM coffeetest_db.foldersandfilesonserver where ' +
        '`id`=:id;')
    Left = 728
    Top = 248
    ParamData = <
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qIsFolder: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'SELECT isFolder FROM coffeetest_db.foldersandfilesonserver where' +
        ' id=:id;')
    Left = 624
    Top = 280
    ParamData = <
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qSelectFromFoldersAndFilesWhereID: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'SELECT * FROM coffeetest_db.foldersandfilesonserver where id=:id' +
        ';')
    Left = 720
    Top = 32
    ParamData = <
      item
        Name = 'ID'
        DataType = ftInteger
        ParamType = ptInput
        Value = Null
      end>
  end
  object qSelectFromFoldersAndFilesWhereRelPath: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'SELECT * FROM coffeetest_db.foldersandfilesonserver where relPat' +
        'h=:relPath;')
    Left = 792
    Top = 88
    ParamData = <
      item
        Name = 'RELPATH'
        ParamType = ptInput
      end>
  end
  object qSelectFileExtension: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'SELECT * FROM coffeetest_db.fileextensions;')
    Left = 856
    Top = 192
  end
  object qInsertFileExtension: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'INSERT INTO `coffeetest_db`.`fileextensions` (`FileExtension`, `' +
        'FileType_id`) VALUES (:FileExtension, (SELECT id FROM coffeetest' +
        '_db.filetype where FileType=:FileType));')
    Left = 912
    Top = 248
    ParamData = <
      item
        Name = 'FILEEXTENSION'
        ParamType = ptInput
      end
      item
        Name = 'FILETYPE'
        ParamType = ptInput
      end>
  end
end
