-
Notifications
You must be signed in to change notification settings - Fork 0
Edit mongodb provider #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alibazregar
wants to merge
29
commits into
master
Choose a base branch
from
edit-mongodb-provider
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
4ddb5f1
final
alibazregar f36fc59
F
alibazregar 02becdf
FINAL
alibazregar 6a007b8
changes
alibazregar 24a690c
fff
alibazregar d9a5c65
Merge branch 'master' of https://github.com/Manzoomeh/BasisCore.Serve…
alibazregar 0f8976d
changes in tls
alibazregar e6ab809
remove log
alibazregar a5a43ca
add details
alibazregar 72125f5
add details
alibazregar f42cb0c
Merge branch 'master' of https://github.com/Manzoomeh/BasisCore.Serve…
alibazregar 5ca3950
fix request context
alibazregar a11706e
fix secure
alibazregar 60edf42
remove-logs
alibazregar 8a48ab9
fixing alasql structure
alibazregar 3f55541
Merge branch 'master' of https://github.com/Manzoomeh/BasisCore.Serve…
alibazregar 3f169aa
add-alasql-to-root
alibazregar 40f6bab
Merge branch 'master' of https://github.com/Manzoomeh/BasisCore.Serve…
alibazregar 7fc1416
Merge branch 'master' of https://github.com/Manzoomeh/BasisCore.Serve…
alibazregar a312c62
edit cache pipeline
alibazregar 2d05756
FINAL CACHE CHANGES
alibazregar bc41501
first steps
alibazregar ab42a1f
Merge branch 'master' of https://github.com/Manzoomeh/BasisCore.Serve…
alibazregar 4e30cf6
finalize
alibazregar c72ec97
final steps
alibazregar ea10d04
fix package.json
alibazregar 4e2c10a
fix util.js
alibazregar 5f1c6e9
remove insert from connection info
alibazregar 586922a
delete add debug context from context
alibazregar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -11,3 +11,4 @@ il.json | |
| test1.db | ||
| report.json | ||
| cache | ||
| cachefiles | ||
This file contains hidden or 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,32 @@ | ||
| import SourceCommand from "./../renderEngine/Command/Source/BaseClasses/SourceCommand.js"; | ||
| import ICommandResult from "./../renderEngine/Models/ICommandResult.js"; | ||
| export default class FlyCommand extends SourceCommand { | ||
| /** | ||
| * @param {object} flyIl | ||
| */ | ||
| constructor(flyIl) { | ||
| super(flyIl); | ||
| } | ||
|
|
||
| /** | ||
| * @param {string} sourceName | ||
| * @param {IContext} context | ||
| * @returns {Promise<ICommandResult>} | ||
| */ | ||
| async _loadDataAsync(sourceName, context) { | ||
| const [connectionName, command] = await Promise.all([ | ||
| this.connectionName.getValueAsync(context), | ||
| this.toCustomFormatHtmlAsync(context), | ||
| ]); | ||
| const inputs = { | ||
| command, | ||
| dmnid: context.domainId, | ||
| }; | ||
| const encoder = new TextEncoder(); | ||
| const byteMessage = encoder.encode(JSON.stringify(inputs)); | ||
| const parameters = { | ||
| byteMessage, | ||
| }; | ||
| return await context.loadDataAsync(sourceName, connectionName, parameters); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| export default class IMongoSettingData { | ||
| /** @type {string} */ | ||
| dataBase; | ||
| /** @type {string}*/ | ||
| endpoint; | ||
| /** @type {string}*/ | ||
| collection; | ||
| /** @type {string}*/ | ||
| method; | ||
| /**@type {object} */ | ||
| query; | ||
| address; | ||
| /** @type {?string}*/ | ||
| databaseName; | ||
| /** @type {?string}*/ | ||
| collectionName; | ||
| /** @type {string}*/ | ||
| method; | ||
| /**@type {object} */ | ||
| query; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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,41 @@ | ||
| import WebSettingData from "./WebSettingData.js"; | ||
| import ConnectionInfo from "./ConnectionInfo.js"; | ||
| import DataSourceCollection from "../../renderEngine/Source/DataSourceCollection.js"; | ||
| import CancellationToken from "../../renderEngine/Cancellation/CancellationToken.js"; | ||
| import BasisCoreException from "../Exceptions/BasisCoreException.js"; | ||
|
|
||
| export default class WebConnectionInfo extends ConnectionInfo { | ||
| /** @type {string} */ | ||
| url; | ||
| /** | ||
| * @param {string} name | ||
| * @param {WebSettingData} settings | ||
| */ | ||
| constructor(name, settings) { | ||
| super(name); | ||
| this.url = settings.url; | ||
| } | ||
|
|
||
| /** | ||
| * @param {NodeJS.Dict<object|string|number>} parameters | ||
| * @param {CancellationToken} cancellationToken | ||
| * @returns {Promise<DataSourceCollection>} | ||
| */ | ||
| async loadDataAsync(parameters, cancellationToken) { | ||
| try { | ||
| let body = new URLSearchParams(parameters); | ||
| const response = await fetch(url, { | ||
| method: "POST", | ||
| body: body, | ||
| headers: { | ||
| "Content-Type": "application/x-www-form-urlencoded", | ||
| }, | ||
| }); | ||
| return new DataSourceCollection(await response.json()); | ||
| } catch (error) { | ||
| return new BasisCoreException( | ||
| "Failed to fetch request from url " + this.url | ||
| ); | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,5 @@ | ||
| export default class WebSettingData { | ||
| /** @type {string} */ | ||
| url; | ||
| } | ||
|
|
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -259,4 +259,4 @@ export default class H2HttpHostEndPoint extends SecureHttpHostEndPoint { | |
| next(); | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -90,4 +90,4 @@ export default class NonSecureHttpHostEndPoint extends HttpHostEndPoint { | |
| }); | ||
| return this._server; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should we not use
Index4Response._createDirectoryIfNotExist(pathDirectory)?