-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tool] 구독을 원하는 데이터베이스의 메타데이터를 반환하는 로그인 함수 추가
cremaconsole.exe 에서 사용하는 내장 함수 `login` 경우 모든 데이터베이스의 메타데이터를 반환하 기 때문에 데이터베이스, 테이블, 타입의 개수가 많은 경우 성능을 저하시킨다. 따라서 원하는 데이터베이스의 메타데이터만 반환하는 API 추가함 추가된 API 목록 - cremaconsole.exe `loginDataBase` 함수 - DataBaseCollectionService.SubscribeDataBase API 기존 대비 성능 개선 효과 - 성능: 3.5s -> 0.4s 로 단축됨 - 데이터 트래픽: 기존 70203188 Bytes -> 2004556 Bytes
- Loading branch information
Showing
14 changed files
with
270 additions
and
91 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
client/Ntreev.Crema.Javascript/Methods/LoginDataBaseMethod.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
//Released under the MIT License. | ||
// | ||
//Copyright (c) 2018 Ntreev Soft co., Ltd. | ||
// | ||
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
//documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
//rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit | ||
//persons to whom the Software is furnished to do so, subject to the following conditions: | ||
// | ||
//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the | ||
//Software. | ||
// | ||
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
//WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
//COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
//OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
using Ntreev.Crema.Services; | ||
using Ntreev.Library; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.Composition; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Ntreev.Crema.Javascript.Methods | ||
{ | ||
[Export(typeof(IScriptMethod))] | ||
[PartCreationPolicy(CreationPolicy.NonShared)] | ||
class LoginDataBaseMethod : ScriptMethodBase | ||
{ | ||
protected override Delegate CreateDelegate() | ||
{ | ||
return new Func<string, string, string, string, string>(this.LoginDataBase); | ||
} | ||
|
||
private string LoginDataBase(string address, string dataBaseName, string userID, string password) | ||
{ | ||
if (this.Context is ScriptMethodContext context) | ||
{ | ||
return context.Login(address, dataBaseName, userID, password); | ||
} | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.