├── README.md └── RedisTest ├── RedisTest.dpr ├── RedisTest.dproj ├── RedisTest.res ├── Unit1.dfm ├── Unit1.pas └── uRedisSimpleClient.pas /README.md: -------------------------------------------------------------------------------- 1 | # Redis simple client 2 | 3 | 一个简单小巧的 redis 客户端, 封装了常用的功能,包括 hash set 和 get, queue 之类的命令,也包括事务 Watch unWatch。 4 | 5 | 核心单元: uRedisSimpleClient.pas 6 | 7 | 这个客户端只在我自己的一个项目上运行。至今还没发觉有 BUG。 8 | 9 | 代码借鉴了 dephiredisclient: 10 | 11 | https://github.com/danieleteti/delphiredisclient 12 | 13 | delphiredisclient 用上了工厂模式等 oop 技术, 但我觉得它对 redis 的通讯理解(包括事务)有点不对。所以重新封装了这一个客户端。 14 | 15 | 两相比较, RedisSimpleClient 提供了更可控的 API 交互模式。 16 | 17 | 由于新 DELPHI 的 string 为 2byte wideChar,所以提供了 tBytes 类型的参数以便提交 utf8 的文本。控件初始化的时候,指定一个 TEncoding.UTF8 编码,RedisSimpleClient 会在接收到数据后,自动做编码转换。 18 | 19 | server 开发的要求是严谨的,这个客户端被设计成自动连接的工作模式,它会自己判断并一直维系连接的可靠性。 20 | 21 | 对于 redis db index (数据库索引)的维持,也是自动化的,指定 forceDbIndex = y 即可, 当TCP重连的时候,它会保证你依然连接到指定的 db index。 22 | 23 | 初始化的代码如下: 24 | 25 | cli := TRedisSimpleClient.Create( TEncoding.UTF8); 26 | cli.Host := '127.0.0.1'; 27 | cli.Port := 6379; 28 | cli.ConnectTimeout := 1000; 29 | cli.AuthUserName := '000000'; 30 | cli.ForceDbIndex := -1; 31 | 32 | 操作代码如下: 33 | 34 | if cli.Get('ok') then //cmd is call success 35 | begin 36 | if cli.ResValue.ValueTypeIsBulk then //value of key : ok have data 37 | add('get(ok)= ' + cli.ResValue.GetBulkAsString) 38 | else 39 | if cli.ResValue.ValueTypeIsNullBulk then //value of key : ok is null 40 | add('get(ok)= null'); 41 | end; 42 | 43 | 你会注意到: redis 在执行一个命令后, 就会返回一个数据类型,我把它封装在了 cli.ResValue。 44 | 45 | cli.resValue.ValueType = TRedisValueType 46 | 47 | TRedisValueType = (rvtNone, rvtErr, rvtNullArray, rvtNullBulk, rvtOK, rvtQueued, rvtInt, rvtBulk, rvtArray); 48 | 49 | 50 | 普通情况下,Set 指令这么执行: 51 | 52 | SetOK := cli.Set_('ok', 'abc') and (cli.ResValue.ValueType = TRedisValue._Set_); 53 | //note: const TRedisValue._Set = TRedisValueType.rvtOK 54 | 55 | 在 watch multi 的时候(事务模式),代码应该换成这样: 56 | 57 | SetOK := cli.Set_('ok', 'abc') and (cli.ResValue.ValueType = TRedisValueType.rvtQueued); 58 | 59 | Redis 普通情况下返回 ok,但在事务中返回的是 queue。 60 | 61 | 事务的执行是这样的: 62 | 63 | cli.Watch(['ok']); 64 | cli.Get('ok'); 65 | cli.Multi; 66 | cli.Set_('no', '2'); 67 | cli.HSet('h', 'f1', 'multiset v'); 68 | cli.HSet('h', 'f2', 'multiset 2'); 69 | cli.Exec; 70 | 71 | 目前只是封装了常用的命令,如果你需要的不在列,请参考 delphiredisclient,把命令追加上去(很容易做到)。 72 | 73 | 介绍完毕 74 | -------------------------------------------------------------------------------- /RedisTest/RedisTest.dpr: -------------------------------------------------------------------------------- 1 | program RedisTest; 2 | 3 | uses 4 | Vcl.Forms, 5 | Unit1 in 'Unit1.pas' {Form1}, 6 | uRedisSimpleClient in '..\share_lib\uRedisSimpleClient.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /RedisTest/RedisTest.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {9C86FCAE-57EB-4A81-90AB-0031A2CFEC0E} 4 | 18.6 5 | VCL 6 | RedisTest.dpr 7 | True 8 | Debug 9 | Win32 10 | 1 11 | Application 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | true 44 | Cfg_2 45 | true 46 | true 47 | 48 | 49 | .\$(Platform)\$(Config) 50 | .\$(Platform)\$(Config) 51 | false 52 | false 53 | false 54 | false 55 | false 56 | System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) 57 | $(BDS)\bin\delphi_PROJECTICON.ico 58 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png 59 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png 60 | RedisTest 61 | 62 | 63 | DBXSqliteDriver;dxFlowChartRS26;dxPSdxMapControlLnkRS26;DBXDb2Driver;vclactnband;dxBarRS26;vclFireDAC;dxFireDACEMFRS26;tethering;dxSpreadSheetInplaceRichEditRS26;FireDACADSDriver;rtcSDK;dxPSdxSpreadSheetLnkRS26;dxRichEditCoreRS26;FireDACMSSQLDriver;vcltouch;vcldb;svn;dxGDIPlusRS26;dxPSdxFCLnkRS26;vclib;dxPSLnksRS26;FireDACDBXDriver;cxGridRS26;dxPsPrVwAdvRS26;dxPDFViewerRS26;vclx;dxPScxTLLnkRS26;RESTBackendComponents;VCLRESTComponents;vclie;bindengine;CloudService;dxmdsRS26;FireDACMySQLDriver;dxdborRS26;DataSnapClient;dxFireDACServerModeRS26;bindcompdbx;GR32_D;DBXSybaseASEDriver;IndyIPServer;cxPivotGridRS26;IndySystem;cxTreeListdxBarPopupMenuRS26;dsnapcon;cxTreeListRS26;dxPScxPivotGridLnkRS26;cxSchedulerRibbonStyleEventEditorRS26;dxPSCoreRS26;FireDACMSAccDriver;FireDACInfxDriver;fmxFireDAC;vclimg;dxBarExtItemsRS26;dxSpreadSheetRS26;dxPSdxGaugeControlLnkRS26;emshosting;DBXOdbcDriver;FireDACTDataDriver;FMXTee;dxdbtrRS26;dxRichEditControlCoreRS26;soaprtl;DbxCommonDriver;dxFlowChartAdvancedCustomizeFormRS26;dxDockingRS26;xmlrtl;DataSnapNativeClient;soapmidas;fmxobj;cxLibraryRS26;GR32_R;rtl;emsserverresource;DbxClientDriver;DBXSybaseASADriver;dxPScxSchedulerLnkRS26;dxSpreadSheetConditionalFormattingDialogsRS26;appanalytics;dxRibbonCustomizationFormRS26;cxSchedulerGridRS26;IndyIPClient;bindcompvcl;TeeUI;dxADOEMFRS26;VclSmp;FireDACODBCDriver;dxRibbonRS26;DataSnapIndy10ServerTransport;dxPScxCommonRS26;dxRichEditDocumentModelRS26;DataSnapProviderClient;FireDACMongoDBDriver;dxFlowChartDesignerRS26;dxPScxGridLnkRS26;dxSpreadSheetCoreRS26;DataSnapServerMidas;RESTComponents;DBXInterBaseDriver;AutoUpgraderProD102;dxPScxExtCommonRS26;emsclientfiredac;DataSnapFireDAC;svnui;DBXMSSQLDriver;dxRichEditControlRS26;DatasnapConnectorsFreePascal;dxPScxVGridLnkRS26;dxorgcRS26;dxGaugeControlRS26;bindcompfmx;DBXOracleDriver;inetdb;dxBarDBNavRS26;dxDBXServerModeRS26;rtc_Raw;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;dxServerModeRS26;dxWizardControlRS26;dxTabbedMDIRS26;dxEMFRS26;dbexpress;IndyCore;dxComnRS26;dsnap;DataSnapCommon;emsclient;FireDACCommon;DataSnapConnectors;cxSchedulerTreeBrowserRS26;dxADOServerModeRS26;soapserver;cxPivotGridOLAPRS26;cxVerticalGridRS26;dxtrmdRS26;FireDACOracleDriver;DBXMySQLDriver;cxSchedulerRS26;dxPSdxLCLnkRS26;CPortLibDXE;DBXFirebirdDriver;FFmpeg_DXT3;FireDACCommonODBC;FireDACCommonDriver;dxMapControlRS26;inet;dxSpellCheckerRS26;IndyIPCommon;dxSpreadSheetCoreConditionalFormattingDialogsRS26;vcl;dxPSdxDBOCLnkRS26;FireDACDb2Driver;dxSpreadSheetReportDesignerRS26;dxPScxPCProdRS26;dxNavBarRS26;dxCoreRS26;cxExportRS26;TeeDB;FireDAC;dxHttpIndyRequestRS26;dxPSPrVwRibbonRS26;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;dxPSRichEditControlLnkRS26;cxPivotGridChartRS26;ibxpress;Tee;DataSnapServer;ibxbindings;dxPSdxDBTVLnkRS26;FireDACDSDriver;vclwinx;dxTileControlRS26;dxSkinsCoreRS26;CustomIPTransport;vcldsnap;bindcomp;dxPSdxOCLnkRS26;DBXInformixDriver;dbxcds;adortl;dxSpreadSheetCoreDialogsRS26;dxBarExtDBItemsRS26;dsnapxml;dbrtl;IndyProtocols;inetdbxpress;dxPSdxPDFViewerLnkRS26;dxRichEditInplaceRS26;fmxase;$(DCC_UsePackage) 64 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 65 | Debug 66 | true 67 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 68 | 1033 69 | $(BDS)\bin\default_app.manifest 70 | 71 | 72 | DBXSqliteDriver;dxFlowChartRS26;dxPSdxMapControlLnkRS26;DBXDb2Driver;vclactnband;dxBarRS26;vclFireDAC;dxFireDACEMFRS26;tethering;dxSpreadSheetInplaceRichEditRS26;FireDACADSDriver;dxPSdxSpreadSheetLnkRS26;dxRichEditCoreRS26;FireDACMSSQLDriver;vcltouch;vcldb;dxGDIPlusRS26;dxPSdxFCLnkRS26;vclib;dxPSLnksRS26;FireDACDBXDriver;cxGridRS26;dxPsPrVwAdvRS26;dxPDFViewerRS26;vclx;dxPScxTLLnkRS26;RESTBackendComponents;VCLRESTComponents;vclie;bindengine;CloudService;dxmdsRS26;FireDACMySQLDriver;dxdborRS26;DataSnapClient;dxFireDACServerModeRS26;bindcompdbx;DBXSybaseASEDriver;IndyIPServer;cxPivotGridRS26;IndySystem;cxTreeListdxBarPopupMenuRS26;dsnapcon;cxTreeListRS26;dxPScxPivotGridLnkRS26;cxSchedulerRibbonStyleEventEditorRS26;dxPSCoreRS26;FireDACMSAccDriver;FireDACInfxDriver;fmxFireDAC;vclimg;dxBarExtItemsRS26;dxSpreadSheetRS26;dxPSdxGaugeControlLnkRS26;emshosting;DBXOdbcDriver;FireDACTDataDriver;FMXTee;dxdbtrRS26;dxRichEditControlCoreRS26;soaprtl;DbxCommonDriver;dxFlowChartAdvancedCustomizeFormRS26;dxDockingRS26;xmlrtl;DataSnapNativeClient;soapmidas;fmxobj;cxLibraryRS26;GR32_R;rtl;emsserverresource;DbxClientDriver;DBXSybaseASADriver;dxPScxSchedulerLnkRS26;dxSpreadSheetConditionalFormattingDialogsRS26;appanalytics;dxRibbonCustomizationFormRS26;cxSchedulerGridRS26;IndyIPClient;bindcompvcl;TeeUI;dxADOEMFRS26;VclSmp;FireDACODBCDriver;dxRibbonRS26;DataSnapIndy10ServerTransport;dxPScxCommonRS26;dxRichEditDocumentModelRS26;DataSnapProviderClient;FireDACMongoDBDriver;dxFlowChartDesignerRS26;dxPScxGridLnkRS26;dxSpreadSheetCoreRS26;DataSnapServerMidas;RESTComponents;DBXInterBaseDriver;dxPScxExtCommonRS26;emsclientfiredac;DataSnapFireDAC;DBXMSSQLDriver;dxRichEditControlRS26;DatasnapConnectorsFreePascal;dxPScxVGridLnkRS26;dxorgcRS26;dxGaugeControlRS26;bindcompfmx;DBXOracleDriver;inetdb;dxBarDBNavRS26;dxDBXServerModeRS26;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;dxServerModeRS26;dxWizardControlRS26;dxTabbedMDIRS26;dxEMFRS26;dbexpress;IndyCore;dxComnRS26;dsnap;DataSnapCommon;emsclient;FireDACCommon;DataSnapConnectors;cxSchedulerTreeBrowserRS26;dxADOServerModeRS26;soapserver;cxPivotGridOLAPRS26;cxVerticalGridRS26;dxtrmdRS26;FireDACOracleDriver;DBXMySQLDriver;cxSchedulerRS26;dxPSdxLCLnkRS26;DBXFirebirdDriver;FFmpeg_DXT3;FireDACCommonODBC;FireDACCommonDriver;dxMapControlRS26;inet;dxSpellCheckerRS26;IndyIPCommon;dxSpreadSheetCoreConditionalFormattingDialogsRS26;vcl;dxPSdxDBOCLnkRS26;FireDACDb2Driver;dxSpreadSheetReportDesignerRS26;dxPScxPCProdRS26;dxNavBarRS26;dxCoreRS26;cxExportRS26;TeeDB;FireDAC;dxHttpIndyRequestRS26;dxPSPrVwRibbonRS26;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;dxPSRichEditControlLnkRS26;cxPivotGridChartRS26;ibxpress;Tee;DataSnapServer;ibxbindings;dxPSdxDBTVLnkRS26;FireDACDSDriver;vclwinx;dxTileControlRS26;dxSkinsCoreRS26;CustomIPTransport;vcldsnap;bindcomp;dxPSdxOCLnkRS26;DBXInformixDriver;dbxcds;adortl;dxSpreadSheetCoreDialogsRS26;dxBarExtDBItemsRS26;dsnapxml;dbrtl;IndyProtocols;inetdbxpress;dxPSdxPDFViewerLnkRS26;dxRichEditInplaceRS26;fmxase;$(DCC_UsePackage) 73 | 74 | 75 | DEBUG;$(DCC_Define) 76 | true 77 | false 78 | true 79 | true 80 | true 81 | 82 | 83 | false 84 | true 85 | PerMonitorV2 86 | 87 | 88 | false 89 | RELEASE;$(DCC_Define) 90 | 0 91 | 0 92 | 93 | 94 | true 95 | PerMonitorV2 96 | 97 | 98 | 99 | MainSource 100 | 101 | 102 |
Form1
103 | dfm 104 |
105 | 106 | 107 | Cfg_2 108 | Base 109 | 110 | 111 | Base 112 | 113 | 114 | Cfg_1 115 | Base 116 | 117 |
118 | 119 | Delphi.Personality.12 120 | Application 121 | 122 | 123 | 124 | RedisTest.dpr 125 | 126 | 127 | 128 | 129 | 130 | RedisTest.exe 131 | true 132 | 133 | 134 | 135 | 136 | 1 137 | 138 | 139 | Contents\MacOS 140 | 1 141 | 142 | 143 | 0 144 | 145 | 146 | 147 | 148 | classes 149 | 1 150 | 151 | 152 | 153 | 154 | res\xml 155 | 1 156 | 157 | 158 | 159 | 160 | library\lib\armeabi-v7a 161 | 1 162 | 163 | 164 | 165 | 166 | library\lib\armeabi 167 | 1 168 | 169 | 170 | 171 | 172 | library\lib\mips 173 | 1 174 | 175 | 176 | 177 | 178 | library\lib\armeabi-v7a 179 | 1 180 | 181 | 182 | 183 | 184 | res\drawable 185 | 1 186 | 187 | 188 | 189 | 190 | res\values 191 | 1 192 | 193 | 194 | 195 | 196 | res\values-v21 197 | 1 198 | 199 | 200 | 201 | 202 | res\drawable 203 | 1 204 | 205 | 206 | 207 | 208 | res\drawable-xxhdpi 209 | 1 210 | 211 | 212 | 213 | 214 | res\drawable-ldpi 215 | 1 216 | 217 | 218 | 219 | 220 | res\drawable-mdpi 221 | 1 222 | 223 | 224 | 225 | 226 | res\drawable-hdpi 227 | 1 228 | 229 | 230 | 231 | 232 | res\drawable-xhdpi 233 | 1 234 | 235 | 236 | 237 | 238 | res\drawable-small 239 | 1 240 | 241 | 242 | 243 | 244 | res\drawable-normal 245 | 1 246 | 247 | 248 | 249 | 250 | res\drawable-large 251 | 1 252 | 253 | 254 | 255 | 256 | res\drawable-xlarge 257 | 1 258 | 259 | 260 | 261 | 262 | 1 263 | 264 | 265 | Contents\MacOS 266 | 1 267 | 268 | 269 | 0 270 | 271 | 272 | 273 | 274 | Contents\MacOS 275 | 1 276 | .framework 277 | 278 | 279 | Contents\MacOS 280 | 1 281 | .framework 282 | 283 | 284 | 0 285 | 286 | 287 | 288 | 289 | 1 290 | .dylib 291 | 292 | 293 | 1 294 | .dylib 295 | 296 | 297 | 1 298 | .dylib 299 | 300 | 301 | Contents\MacOS 302 | 1 303 | .dylib 304 | 305 | 306 | Contents\MacOS 307 | 1 308 | .dylib 309 | 310 | 311 | 0 312 | .dll;.bpl 313 | 314 | 315 | 316 | 317 | 1 318 | .dylib 319 | 320 | 321 | 1 322 | .dylib 323 | 324 | 325 | 1 326 | .dylib 327 | 328 | 329 | Contents\MacOS 330 | 1 331 | .dylib 332 | 333 | 334 | Contents\MacOS 335 | 1 336 | .dylib 337 | 338 | 339 | 0 340 | .bpl 341 | 342 | 343 | 344 | 345 | 0 346 | 347 | 348 | 0 349 | 350 | 351 | 0 352 | 353 | 354 | 0 355 | 356 | 357 | Contents\Resources\StartUp\ 358 | 0 359 | 360 | 361 | Contents\Resources\StartUp\ 362 | 0 363 | 364 | 365 | 0 366 | 367 | 368 | 369 | 370 | 1 371 | 372 | 373 | 1 374 | 375 | 376 | 1 377 | 378 | 379 | 380 | 381 | 1 382 | 383 | 384 | 1 385 | 386 | 387 | 1 388 | 389 | 390 | 391 | 392 | 1 393 | 394 | 395 | 1 396 | 397 | 398 | 1 399 | 400 | 401 | 402 | 403 | 1 404 | 405 | 406 | 1 407 | 408 | 409 | 1 410 | 411 | 412 | 413 | 414 | 1 415 | 416 | 417 | 1 418 | 419 | 420 | 1 421 | 422 | 423 | 424 | 425 | 1 426 | 427 | 428 | 1 429 | 430 | 431 | 1 432 | 433 | 434 | 435 | 436 | 1 437 | 438 | 439 | 1 440 | 441 | 442 | 1 443 | 444 | 445 | 446 | 447 | 1 448 | 449 | 450 | 451 | 452 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 453 | 1 454 | 455 | 456 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 457 | 1 458 | 459 | 460 | 461 | 462 | 1 463 | 464 | 465 | 1 466 | 467 | 468 | 469 | 470 | ..\ 471 | 1 472 | 473 | 474 | ..\ 475 | 1 476 | 477 | 478 | 479 | 480 | 1 481 | 482 | 483 | 1 484 | 485 | 486 | 1 487 | 488 | 489 | 490 | 491 | 1 492 | 493 | 494 | 1 495 | 496 | 497 | 1 498 | 499 | 500 | 501 | 502 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 503 | 1 504 | 505 | 506 | 507 | 508 | ..\ 509 | 1 510 | 511 | 512 | ..\ 513 | 1 514 | 515 | 516 | 517 | 518 | Contents 519 | 1 520 | 521 | 522 | Contents 523 | 1 524 | 525 | 526 | 527 | 528 | Contents\Resources 529 | 1 530 | 531 | 532 | Contents\Resources 533 | 1 534 | 535 | 536 | 537 | 538 | library\lib\armeabi-v7a 539 | 1 540 | 541 | 542 | 1 543 | 544 | 545 | 1 546 | 547 | 548 | 1 549 | 550 | 551 | 1 552 | 553 | 554 | Contents\MacOS 555 | 1 556 | 557 | 558 | Contents\MacOS 559 | 1 560 | 561 | 562 | 0 563 | 564 | 565 | 566 | 567 | 1 568 | 569 | 570 | 1 571 | 572 | 573 | 574 | 575 | Assets 576 | 1 577 | 578 | 579 | Assets 580 | 1 581 | 582 | 583 | 584 | 585 | Assets 586 | 1 587 | 588 | 589 | Assets 590 | 1 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | True 605 | False 606 | 607 | 608 | 12 609 | 610 | 611 | 612 | 613 |
614 | -------------------------------------------------------------------------------- /RedisTest/RedisTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jump-pig/RedisSimpleClient/2b1a9dc2443968d68a41d9d601ecb2262cf7a518/RedisTest/RedisTest.res -------------------------------------------------------------------------------- /RedisTest/Unit1.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 468 6 | ClientWidth = 774 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnClose = FormClose 15 | OnCreate = FormCreate 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object Memo1: TMemo 19 | Left = 0 20 | Top = 0 21 | Width = 377 22 | Height = 468 23 | Align = alLeft 24 | Lines.Strings = ( 25 | 'Memo1') 26 | TabOrder = 0 27 | end 28 | object BitBtn1: TBitBtn 29 | Left = 408 30 | Top = 16 31 | Width = 161 32 | Height = 81 33 | Caption = 'BitBtn1' 34 | TabOrder = 1 35 | OnClick = BitBtn1Click 36 | end 37 | object BitBtn2: TBitBtn 38 | Left = 575 39 | Top = 16 40 | Width = 153 41 | Height = 81 42 | Caption = 'BitBtn2' 43 | TabOrder = 2 44 | OnClick = BitBtn2Click 45 | end 46 | object BitBtn3: TBitBtn 47 | Left = 400 48 | Top = 128 49 | Width = 137 50 | Height = 65 51 | Caption = 'BitBtn3' 52 | TabOrder = 3 53 | OnClick = BitBtn3Click 54 | end 55 | object BitBtn4: TBitBtn 56 | Left = 560 57 | Top = 128 58 | Width = 65 59 | Height = 65 60 | Caption = 'BitBtn4' 61 | TabOrder = 4 62 | OnClick = BitBtn4Click 63 | end 64 | object BitBtn5: TBitBtn 65 | Left = 408 66 | Top = 209 67 | Width = 105 68 | Height = 41 69 | Caption = 'BitBtn5' 70 | TabOrder = 5 71 | OnClick = BitBtn5Click 72 | end 73 | object BitBtn6: TBitBtn 74 | Left = 544 75 | Top = 208 76 | Width = 97 77 | Height = 41 78 | Caption = 'BitBtn6' 79 | TabOrder = 6 80 | OnClick = BitBtn6Click 81 | end 82 | object BitBtn7: TBitBtn 83 | Left = 408 84 | Top = 256 85 | Width = 121 86 | Height = 57 87 | Caption = 'BitBtn7' 88 | TabOrder = 7 89 | OnClick = BitBtn7Click 90 | end 91 | object BitBtn8: TBitBtn 92 | Left = 400 93 | Top = 344 94 | Width = 88 95 | Height = 32 96 | Caption = 'sadd' 97 | TabOrder = 8 98 | OnClick = BitBtn8Click 99 | end 100 | object BitBtn9: TBitBtn 101 | Left = 494 102 | Top = 344 103 | Width = 88 104 | Height = 32 105 | Caption = 'SCARD' 106 | TabOrder = 9 107 | OnClick = BitBtn9Click 108 | end 109 | object BitBtn10: TBitBtn 110 | Left = 400 111 | Top = 382 112 | Width = 88 113 | Height = 32 114 | Caption = 'SISMEMBER' 115 | TabOrder = 10 116 | OnClick = BitBtn10Click 117 | end 118 | object BitBtn11: TBitBtn 119 | Left = 494 120 | Top = 382 121 | Width = 88 122 | Height = 32 123 | Caption = 'SMEMBERS' 124 | TabOrder = 11 125 | OnClick = BitBtn11Click 126 | end 127 | object BitBtn12: TBitBtn 128 | Left = 400 129 | Top = 420 130 | Width = 88 131 | Height = 32 132 | Caption = 'SREM' 133 | TabOrder = 12 134 | OnClick = BitBtn12Click 135 | end 136 | object BitBtn13: TBitBtn 137 | Left = 632 138 | Top = 343 139 | Width = 96 140 | Height = 33 141 | Caption = 'SETRANGE' 142 | TabOrder = 13 143 | OnClick = BitBtn13Click 144 | end 145 | object BitBtn15: TBitBtn 146 | Left = 632 147 | Top = 380 148 | Width = 96 149 | Height = 33 150 | Caption = 'GETRANGE' 151 | TabOrder = 14 152 | OnClick = BitBtn15Click 153 | end 154 | object IdTCPClient1: TIdTCPClient 155 | ConnectTimeout = 0 156 | IPVersion = Id_IPv4 157 | Port = 0 158 | ReadTimeout = -1 159 | Left = 344 160 | Top = 232 161 | end 162 | end 163 | -------------------------------------------------------------------------------- /RedisTest/Unit1.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jump-pig/RedisSimpleClient/2b1a9dc2443968d68a41d9d601ecb2262cf7a518/RedisTest/Unit1.pas -------------------------------------------------------------------------------- /RedisTest/uRedisSimpleClient.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jump-pig/RedisSimpleClient/2b1a9dc2443968d68a41d9d601ecb2262cf7a518/RedisTest/uRedisSimpleClient.pas --------------------------------------------------------------------------------