├── Version ├── agdb_server ├── pepper ├── tests │ ├── test_cert.key.pem │ ├── test_root_ca.key.pem │ ├── test_cert.pem │ ├── test_root_ca.pem │ └── routes │ │ └── user_logout_test.rs ├── test_certs │ ├── test_cert.key.pem │ ├── test_root_ca.key.pem │ ├── test_root_ca.pem │ └── test_cert.pem ├── src │ ├── routes.rs │ └── action │ │ ├── cluster_logout.rs │ │ ├── db_optimize.rs │ │ ├── user_delete.rs │ │ ├── cluster_login.rs │ │ ├── db_delete.rs │ │ ├── db_remove.rs │ │ ├── db_exec.rs │ │ ├── change_password.rs │ │ ├── db_user_remove.rs │ │ ├── db_backup.rs │ │ ├── user_add.rs │ │ ├── db_clear.rs │ │ ├── db_user_add.rs │ │ └── db_restore.rs ├── containerfile └── build.rs ├── agdb_web ├── .npmrc ├── content │ ├── docs │ │ ├── 02.examples │ │ │ ├── .navigation.yml │ │ │ └── 01.index.md │ │ ├── 03.references │ │ │ ├── .navigation.yml │ │ │ ├── 03.studio.md │ │ │ ├── 04.cloud.md │ │ │ └── 00.index.md │ │ └── 01.guides │ │ │ ├── 03.how-to-run-server │ │ │ └── .navigation.yml │ │ │ ├── 04.how-to-use-studio.md │ │ │ ├── 05.troubleshooting.md │ │ │ └── index.md │ ├── contact.md │ ├── index.md │ ├── enterprise │ │ ├── 02.cloud.md │ │ ├── 05.sponsors.md │ │ ├── 04.support.md │ │ └── index.md │ ├── api-docs │ │ └── 01.openapi.md │ └── blog │ │ └── index.md ├── public │ ├── favicon.ico │ └── images │ │ ├── c.png │ │ ├── db.png │ │ ├── js.png │ │ ├── ts.png │ │ ├── x.png │ │ ├── api.png │ │ ├── cloud.png │ │ ├── cpp.png │ │ ├── java.png │ │ ├── rust.png │ │ ├── csharp.png │ │ ├── python.png │ │ ├── reddit.png │ │ ├── server.png │ │ ├── studio.png │ │ ├── distance_2.png │ │ ├── linkedin.png │ │ ├── distance_simple.png │ │ ├── stackoverflow.png │ │ ├── distance_outputs.png │ │ ├── distance_outputs_search.png │ │ └── distance_simple_reversed.png ├── tsconfig.json ├── .env.example ├── .editorconfig ├── renovate.json ├── .gitignore ├── app │ ├── components │ │ ├── AppHeader.nuxt.spec.ts │ │ └── AppFooter.vue │ ├── layouts │ │ └── docs.nuxt.spec.ts │ ├── assets │ │ └── css │ │ │ └── main.css │ ├── pages │ │ └── index.vue │ └── error.vue └── content.config.ts ├── agdb ├── src │ ├── test_utilities.rs │ ├── utilities.rs │ ├── collections.rs │ ├── query_builder │ │ ├── select_indexes.rs │ │ ├── remove_ids.rs │ │ ├── select_ids.rs │ │ ├── select_node_count.rs │ │ ├── insert_index.rs │ │ ├── remove_index.rs │ │ └── remove_aliases.rs │ └── transaction.rs ├── tests │ └── test_db_prior_0_11_0.agdb └── Cargo.toml ├── agdb_api ├── typescript │ ├── .prettierignore │ ├── .gitignore │ ├── .prettierrc.json │ ├── vite.config.ts │ ├── tsconfig.json │ ├── eslint.config.mjs │ ├── src │ │ └── index.ts │ ├── test.sh │ └── vitest.config.ts ├── php │ ├── phpstan.neon │ ├── .openapi-generator-ignore │ ├── package.json │ ├── docs │ │ └── Model │ │ │ ├── DbKind.md │ │ │ ├── DbResource.md │ │ │ ├── DbUserRole.md │ │ │ ├── QueryConditionLogic.md │ │ │ ├── SearchQueryAlgorithm.md │ │ │ ├── QueryConditionModifier.md │ │ │ ├── UserCredentials.md │ │ │ ├── DbValueOneOf4.md │ │ │ ├── QueryIdOneOf1.md │ │ │ ├── ServerDatabaseRename.md │ │ │ ├── DbValueOneOf1.md │ │ │ ├── DbValueOneOf2.md │ │ │ ├── DbValueOneOf8.md │ │ │ ├── UserLogin.md │ │ │ ├── CountComparisonOneOf.md │ │ │ ├── CountComparisonOneOf1.md │ │ │ ├── CountComparisonOneOf3.md │ │ │ ├── CountComparisonOneOf5.md │ │ │ ├── DbTypeParam.md │ │ │ ├── DbValueOneOf.md │ │ │ ├── DbValueOneOf5.md │ │ │ ├── DbValueOneOf6.md │ │ │ ├── DbValueOneOf7.md │ │ │ ├── ChangePassword.md │ │ │ ├── CountComparisonOneOf2.md │ │ │ ├── CountComparisonOneOf4.md │ │ │ ├── DbUserRoleParam.md │ │ │ ├── QueryTypeOneOf9.md │ │ │ ├── QueryIdsOneOf1.md │ │ │ ├── ServerDatabaseAdminRename.md │ │ │ ├── UserStatus.md │ │ │ ├── ClusterStatus.md │ │ │ ├── ComparisonOneOf3.md │ │ │ ├── DbUser.md │ │ │ ├── QueryTypeOneOf1.md │ │ │ ├── QueryTypeOneOf3.md │ │ │ ├── ServerDatabaseResource.md │ │ │ ├── ComparisonOneOf.md │ │ │ ├── ComparisonOneOf1.md │ │ │ ├── ComparisonOneOf5.md │ │ │ ├── ComparisonOneOf6.md │ │ │ ├── ComparisonOneOf8.md │ │ │ ├── DbKeyOrderOneOf.md │ │ │ ├── QueryIdsOneOf.md │ │ │ ├── QueryTypeOneOf.md │ │ │ ├── QueryTypeOneOf17.md │ │ │ ├── QueryTypeOneOf4.md │ │ │ ├── ComparisonOneOf7.md │ │ │ ├── DbKeyOrderOneOf1.md │ │ │ ├── ComparisonOneOf4.md │ │ │ ├── QueryTypeOneOf12.md │ │ │ ├── ComparisonOneOf2.md │ │ │ ├── QueryTypeOneOf2.md │ │ │ ├── QueryTypeOneOf7.md │ │ │ ├── QueryAudit.md │ │ │ ├── QueryConditionDataOneOf4.md │ │ │ ├── AdminStatus.md │ │ │ ├── QueryConditionDataOneOf6.md │ │ │ ├── SelectValuesQuery.md │ │ │ ├── InsertAliasesQuery.md │ │ │ ├── QueryConditionDataOneOf7.md │ │ │ ├── DbKeyValue.md │ │ │ ├── QueryValuesOneOf.md │ │ │ ├── QueryIds.md │ │ │ ├── QueryConditionDataOneOf.md │ │ │ ├── QueryResult.md │ │ │ ├── DbKeyOrder.md │ │ │ ├── KeyValueComparison.md │ │ │ ├── QueryValuesOneOf1.md │ │ │ ├── QueryConditionDataOneOf3.md │ │ │ ├── QueryConditionDataOneOf2.md │ │ │ ├── QueryConditionDataOneOf5.md │ │ │ ├── InsertValuesQuery.md │ │ │ ├── QueryTypeOneOf6.md │ │ │ ├── QueryTypeOneOf11.md │ │ │ ├── ServerDatabase.md │ │ │ ├── QueryConditionDataOneOf1.md │ │ │ ├── QueryIdOneOf.md │ │ │ ├── QueryTypeOneOf14.md │ │ │ ├── QueryTypeOneOf16.md │ │ │ ├── QueryTypeOneOf13.md │ │ │ ├── QueryId.md │ │ │ ├── SelectEdgeCountQuery.md │ │ │ ├── QueryTypeOneOf10.md │ │ │ ├── CountComparison.md │ │ │ ├── DbValueOneOf3.md │ │ │ ├── QueryTypeOneOf15.md │ │ │ ├── QueryTypeOneOf8.md │ │ │ ├── QueryTypeOneOf5.md │ │ │ ├── QueryValues.md │ │ │ ├── InsertNodesQuery.md │ │ │ ├── QueryCondition.md │ │ │ └── InsertEdgesQuery.md │ └── e2e │ │ └── example.spec.ts └── rust │ ├── src │ ├── api_result.rs │ └── lib.rs │ └── Cargo.toml ├── agdb_studio ├── app │ ├── .env │ ├── e2e-utils │ │ ├── constants.ts │ │ ├── utils.ts │ │ ├── screenshots.ts │ │ └── interaction.ts │ ├── public │ │ └── favicon.ico │ ├── env.d.ts │ ├── tsconfig.vitest.json │ ├── src │ │ ├── views │ │ │ ├── admin │ │ │ │ ├── AdminDbView.vue │ │ │ │ ├── AdminDbView.spec.ts │ │ │ │ └── AdminView.vue │ │ │ ├── LoginView.spec.ts │ │ │ ├── HomeView.spec.ts │ │ │ ├── HomeView.vue │ │ │ ├── NotFoundView.spec.ts │ │ │ ├── NotFoundView.vue │ │ │ ├── QueryView.vue │ │ │ └── LoginView.vue │ │ ├── App.vue │ │ ├── assets │ │ │ ├── form.less │ │ │ ├── scrollbar.less │ │ │ └── main.css │ │ ├── types │ │ │ └── graph.d.ts │ │ ├── main.ts │ │ └── tests │ │ │ └── data │ │ │ └── simpleData.json │ ├── globals.d.ts │ ├── tsconfig.json │ ├── index.html │ ├── e2e │ │ └── tsconfig.json │ ├── tsconfig.app.json │ ├── tsconfig.node.json │ └── vite.config.mts ├── libs │ ├── core │ │ ├── design │ │ │ ├── src │ │ │ │ ├── components │ │ │ │ │ ├── icons │ │ │ │ │ │ ├── CrownIcon.vue │ │ │ │ │ │ ├── LogoIcon.vue │ │ │ │ │ │ ├── SpinnerIcon.vue │ │ │ │ │ │ └── icons.spec.ts │ │ │ │ │ └── transitions │ │ │ │ │ │ ├── FadeTransition.vue │ │ │ │ │ │ └── SlideUpTransition.vue │ │ │ │ └── types │ │ │ │ │ └── base.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.node.json │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vitest.config.mts │ │ │ └── package.json │ │ ├── api │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── src │ │ │ │ └── constants.ts │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ │ ├── auth │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ ├── vitest.config.mts │ │ │ ├── src │ │ │ │ └── account.ts │ │ │ └── package.json │ │ ├── profile │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── src │ │ │ │ ├── components │ │ │ │ │ ├── ProfileMenu.vue │ │ │ │ │ └── ProfileDropdown.vue │ │ │ │ └── composables │ │ │ │ │ └── admin.ts │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ │ ├── router │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ │ └── utils │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ ├── vitest.config.mts │ │ │ └── package.json │ ├── features │ │ ├── query │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ ├── vitest.config.mts │ │ │ └── src │ │ │ │ ├── composables │ │ │ │ └── types.ts │ │ │ │ ├── components │ │ │ │ ├── builder │ │ │ │ │ ├── QueryStep.vue │ │ │ │ │ └── QueryBuilderTabs.spec.ts │ │ │ │ └── view │ │ │ │ │ └── QueryView.vue │ │ │ │ └── mock │ │ │ │ └── queryApiMock.ts │ │ ├── cluster │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ │ ├── common │ │ │ ├── src │ │ │ │ └── composables │ │ │ │ │ ├── modal │ │ │ │ │ ├── constants.ts │ │ │ │ │ └── types.ts │ │ │ │ │ ├── table │ │ │ │ │ ├── constants.ts │ │ │ │ │ ├── utils.ts │ │ │ │ │ └── utils.spec.ts │ │ │ │ │ └── content │ │ │ │ │ └── utils.ts │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ │ ├── db │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── src │ │ │ │ └── composables │ │ │ │ │ └── types.ts │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ │ ├── user │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ │ └── notification │ │ │ ├── env.d.ts │ │ │ ├── tsconfig.vitest.json │ │ │ ├── tsconfig.node.json │ │ │ ├── globals.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.app.json │ │ │ ├── vite.config.mts │ │ │ └── vitest.config.mts │ └── config │ │ ├── testing │ │ ├── tsconfig.json │ │ ├── vitest.setup.ts │ │ ├── package.json │ │ └── vitest.shared.js │ │ └── tsconfig │ │ ├── tsconfig.vitest.json │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── package.json ├── prettier.config.mjs ├── .vscode │ └── extensions.json └── .gitignore ├── .dockerignore ├── examples ├── server_client_typescript │ ├── .gitignore │ ├── tsconfig.json │ ├── eslint.config.mjs │ └── package.json ├── server_client_php │ ├── package.json │ └── composer.json ├── app_db │ └── Cargo.toml ├── indexes │ └── Cargo.toml ├── joins │ └── Cargo.toml ├── user_types │ └── Cargo.toml ├── schema_migration │ └── Cargo.toml └── server_client_rust │ └── Cargo.toml ├── agdb_benchmarks ├── src │ ├── bench_result.rs │ └── bench_error.rs └── Cargo.toml ├── vitest.workspace.ts ├── .gitattributes ├── agdb_ci ├── Cargo.toml └── src │ ├── ci_error.rs │ ├── sources.rs │ ├── language │ └── php.rs │ └── utilities.rs ├── .gitignore ├── Cargo.toml ├── agdb_derive ├── Cargo.toml └── src │ └── api_def │ └── expression │ ├── array.rs │ └── block.rs ├── turbo.json ├── .github ├── workflows │ ├── agdb_benchmarks.yaml │ ├── pr_title.yaml │ ├── agdb_api_php.yaml │ └── agdb_api_typescript.yaml └── FUNDING.yml └── package.json /Version: -------------------------------------------------------------------------------- 1 | 0.12.5 2 | -------------------------------------------------------------------------------- /agdb_server/pepper: -------------------------------------------------------------------------------- 1 | 1234567891234567 -------------------------------------------------------------------------------- /agdb_web/.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | -------------------------------------------------------------------------------- /agdb/src/test_utilities.rs: -------------------------------------------------------------------------------- 1 | pub mod test_file; 2 | -------------------------------------------------------------------------------- /agdb_api/typescript/.prettierignore: -------------------------------------------------------------------------------- 1 | src/openapi.d.ts 2 | -------------------------------------------------------------------------------- /agdb_api/typescript/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | -------------------------------------------------------------------------------- /agdb_studio/app/.env: -------------------------------------------------------------------------------- 1 | VITE_API_URL=https://localhost:3000 2 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/src/components/icons/CrownIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /agdb/src/utilities.rs: -------------------------------------------------------------------------------- 1 | pub mod serialize; 2 | pub mod stable_hash; 3 | -------------------------------------------------------------------------------- /agdb_studio/app/e2e-utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const TIMEOUT = 3000; 2 | -------------------------------------------------------------------------------- /agdb_web/content/docs/02.examples/.navigation.yml: -------------------------------------------------------------------------------- 1 | title: "Examples" 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | **/vendor 3 | **/node_modules 4 | **/build 5 | -------------------------------------------------------------------------------- /agdb_web/content/docs/03.references/.navigation.yml: -------------------------------------------------------------------------------- 1 | title: "References" 2 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/cluster/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/server_client_typescript/.gitignore: -------------------------------------------------------------------------------- 1 | main.js 2 | main.js.map 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /agdb_web/content/docs/01.guides/03.how-to-run-server/.navigation.yml: -------------------------------------------------------------------------------- 1 | title: "How to run server?" 2 | -------------------------------------------------------------------------------- /agdb_web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/favicon.ico -------------------------------------------------------------------------------- /agdb_api/php/phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | ignoreErrors: 3 | - identifier: missingType.iterableValue 4 | -------------------------------------------------------------------------------- /agdb_web/public/images/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/c.png -------------------------------------------------------------------------------- /agdb_web/public/images/db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/db.png -------------------------------------------------------------------------------- /agdb_web/public/images/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/js.png -------------------------------------------------------------------------------- /agdb_web/public/images/ts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/ts.png -------------------------------------------------------------------------------- /agdb_web/public/images/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/x.png -------------------------------------------------------------------------------- /agdb_studio/libs/config/testing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/src/composables/modal/constants.ts: -------------------------------------------------------------------------------- 1 | export const KEY_MODAL = Symbol("modal"); 2 | -------------------------------------------------------------------------------- /agdb_web/public/images/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/api.png -------------------------------------------------------------------------------- /agdb_web/public/images/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/cloud.png -------------------------------------------------------------------------------- /agdb_web/public/images/cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/cpp.png -------------------------------------------------------------------------------- /agdb_web/public/images/java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/java.png -------------------------------------------------------------------------------- /agdb_web/public/images/rust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/rust.png -------------------------------------------------------------------------------- /agdb_studio/app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_studio/app/public/favicon.ico -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/src/types/base.ts: -------------------------------------------------------------------------------- 1 | export type StyleObject = { 2 | [key: string]: string; 3 | }; 4 | -------------------------------------------------------------------------------- /agdb_web/content/docs/03.references/03.studio.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Studio" 3 | description: "" 4 | --- 5 | 6 | TBD 7 | -------------------------------------------------------------------------------- /agdb_web/public/images/csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/csharp.png -------------------------------------------------------------------------------- /agdb_web/public/images/python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/python.png -------------------------------------------------------------------------------- /agdb_web/public/images/reddit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/reddit.png -------------------------------------------------------------------------------- /agdb_web/public/images/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/server.png -------------------------------------------------------------------------------- /agdb_web/public/images/studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/studio.png -------------------------------------------------------------------------------- /agdb/tests/test_db_prior_0_11_0.agdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb/tests/test_db_prior_0_11_0.agdb -------------------------------------------------------------------------------- /agdb_web/public/images/distance_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/distance_2.png -------------------------------------------------------------------------------- /agdb_web/public/images/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/linkedin.png -------------------------------------------------------------------------------- /agdb/src/collections.rs: -------------------------------------------------------------------------------- 1 | pub mod bit_set; 2 | pub mod indexed_map; 3 | pub mod map; 4 | pub mod multi_map; 5 | pub mod vec; 6 | -------------------------------------------------------------------------------- /agdb_api/rust/src/api_result.rs: -------------------------------------------------------------------------------- 1 | use crate::api_error::AgdbApiError; 2 | 3 | pub type AgdbApiResult = Result; 4 | -------------------------------------------------------------------------------- /agdb_web/public/images/distance_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/distance_simple.png -------------------------------------------------------------------------------- /agdb_web/public/images/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/stackoverflow.png -------------------------------------------------------------------------------- /agdb_web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://nuxt.com/docs/guide/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | -------------------------------------------------------------------------------- /agdb_web/.env.example: -------------------------------------------------------------------------------- 1 | # Public URL, used for OG Image when running nuxt generate 2 | NUXT_PUBLIC_SITE_URL=https://agdb.agnesoft.com/ 3 | -------------------------------------------------------------------------------- /agdb_web/content/docs/01.guides/04.how-to-use-studio.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "How to use studio?" 3 | description: "" 4 | --- 5 | 6 | TBD 7 | -------------------------------------------------------------------------------- /agdb_web/public/images/distance_outputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/distance_outputs.png -------------------------------------------------------------------------------- /agdb_benchmarks/src/bench_result.rs: -------------------------------------------------------------------------------- 1 | use crate::bench_error::BenchError; 2 | 3 | pub(crate) type BenchResult = Result; 4 | -------------------------------------------------------------------------------- /agdb_studio/app/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_web/public/images/distance_outputs_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/distance_outputs_search.png -------------------------------------------------------------------------------- /agdb_web/public/images/distance_simple_reversed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnesoft/agdb/HEAD/agdb_web/public/images/distance_simple_reversed.png -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_web/content/contact.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contact us 3 | description: "Contact the agdb team at Agnesoft" 4 | --- 5 | 6 | E-mail: agnesoft@agnesoft.com 7 | -------------------------------------------------------------------------------- /agdb_api/typescript/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/prettierrc", 3 | "tabWidth": 4, 4 | "endOfLine": "auto" 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/app/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | interface ImportMetaEnv { 3 | readonly VITE_API_URL: string; 4 | } 5 | -------------------------------------------------------------------------------- /agdb_web/content/docs/03.references/04.cloud.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Cloud" 3 | description: "Cloud deployment and hosting options for agdb" 4 | --- 5 | 6 | TBD 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/testing/vitest.setup.ts: -------------------------------------------------------------------------------- 1 | import "./mocks/apiMock"; 2 | 3 | document.body.innerHTML = ` 4 | 5 |
6 | 7 | `; 8 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/cluster/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@agdb-studio/tsconfig/tsconfig.vitest.json", 4 | "./tsconfig.app.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /agdb_api/php/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .openapi-generator 3 | .gitignore 4 | .travis.yml 5 | git_push.sh 6 | phpunit.xml.dist 7 | .php-cs-fixer.dist.php 8 | composer.json 9 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/admin/AdminDbView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/src/constants.ts: -------------------------------------------------------------------------------- 1 | export const ACCESS_TOKEN = "studio_token"; 2 | export const MAX_CONNECTION_ATTEMPTS = 20; 3 | export const BASE_CONNECTION_TIMEOUT = 500; 4 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_web/content/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: agdb 3 | description: Application‑native graph database with constant‑time queries and no query language 4 | --- 5 | 6 | ::home-page 7 | :: 8 | -------------------------------------------------------------------------------- /examples/server_client_php/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "devDependencies": { 4 | "@prettier/plugin-php": "catalog:", 5 | "prettier": "catalog:" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /agdb_api/php/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "devDependencies": { 4 | "@prettier/plugin-php": "catalog:", 5 | "prettier": "catalog:" 6 | }, 7 | "scripts": {} 8 | } 9 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/cluster/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /examples/app_db/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "examples_app_db" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | agdb = { version = "0.12.5", path = "../../agdb" } 8 | -------------------------------------------------------------------------------- /examples/indexes/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "examples_indexes" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | agdb = { version = "0.12.5", path = "../../agdb" } 8 | -------------------------------------------------------------------------------- /examples/joins/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "examples_joins" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | agdb = { version = "0.12.5", path = "../../agdb" } 8 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/src/composables/types.ts: -------------------------------------------------------------------------------- 1 | import type { ServerDatabase } from "@agnesoft/agdb_api/openapi"; 2 | 3 | export type DbIdentification = Pick; 4 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "globals.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /examples/user_types/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "examples_user_types" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | agdb = { version = "0.12.5", path = "../../agdb" } 8 | -------------------------------------------------------------------------------- /examples/schema_migration/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "examples_schema_migration" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | agdb = { version = "0.12.5", path = "../../agdb" } 8 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/tsconfig/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.app.json", 3 | "exclude": [], 4 | "compilerOptions": { 5 | "lib": [], 6 | "types": ["node", "jsdom", "vitest/globals"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/src/composables/table/constants.ts: -------------------------------------------------------------------------------- 1 | export const INJECT_KEY_COLUMNS = Symbol("columns"); 2 | export const INJECT_KEY_ROW = Symbol("row"); 3 | export const INJECT_KEY_TABLE_NAME = Symbol("tableName"); 4 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@agdb-studio/testing/vitest.shared" { 2 | import { ViteUserConfig } from "vitest/config"; 3 | const config: ViteUserConfig; 4 | export default config; 5 | } 6 | -------------------------------------------------------------------------------- /agdb_studio/app/globals.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare module "@agdb-studio/testing/vitest.shared" { 3 | import { ViteUserConfig } from "vitest/config"; 4 | const config: ViteUserConfig; 5 | export default config; 6 | } 7 | -------------------------------------------------------------------------------- /agdb_studio/prettier.config.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @see https://prettier.io/docs/configuration 3 | * @type {import("prettier").Config} 4 | */ 5 | const config = { 6 | tabWidth: 2, 7 | endOfLine: "auto", 8 | }; 9 | 10 | export default config; 11 | -------------------------------------------------------------------------------- /agdb_studio/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Vue.volar", 4 | "Vue.vscode-typescript-vue-plugin", 5 | "ms-playwright.playwright", 6 | "dbaeumer.vscode-eslint", 7 | "esbenp.prettier-vscode" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.node.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "componentEntries.ts", 7 | "globals.d.ts" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /vitest.workspace.ts: -------------------------------------------------------------------------------- 1 | import { defineWorkspace } from "vitest/config"; 2 | 3 | export default defineWorkspace([ 4 | "./agdb_api/typescript/vitest.config.ts", 5 | "./agdb_studio/**/vitest.config.mts", 6 | "./agdb_web/**/vitest.config.mts", 7 | ]); 8 | -------------------------------------------------------------------------------- /agdb_studio/app/e2e-utils/utils.ts: -------------------------------------------------------------------------------- 1 | import { type Page } from "@playwright/test"; 2 | 3 | export const mockLogin = async (page: Page) => { 4 | await page.addInitScript(() => { 5 | window.localStorage.setItem("studio_token", "mocked-token"); 6 | }); 7 | }; 8 | -------------------------------------------------------------------------------- /agdb_studio/app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_server/tests/test_cert.key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgMdh0kQSqxqJSAZrl 3 | +7+5sN6z07RdC11KRswGA5JaQy+hRANCAAQzetUbU9vq9WI5fLjw7dh0MWkTLlmW 4 | 0aptniMEj4FcsjITMmK/BZqps2j93OIwRj5QkScsKVgqD1wPPVmFcVZP 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/src/composables/table/utils.ts: -------------------------------------------------------------------------------- 1 | import type { TCellType } from "./types"; 2 | 3 | export const dateFormatter = (value: TCellType): string => { 4 | return value && typeof value === "number" 5 | ? new Date(value * 1000).toUTCString() 6 | : "N/A"; 7 | }; 8 | -------------------------------------------------------------------------------- /agdb_web/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_size = 2 6 | indent_style = space 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /agdb_server/test_certs/test_cert.key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgEPpEprqQwhV7Swny 3 | e4L5sOoJY2bgtOGUe/57pqrdYmWhRANCAAR6UWQt5Ry0JzVyV5xubHQNZS15Z2K/ 4 | wmQhCKq2NR0skkbi+mKOAJRyXZNIYwyDovttm4jLJBivf7pzT7MELqk1 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /agdb_server/tests/test_root_ca.key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgfsVqJXY4NhNtQ1eX 3 | ZCVmNuphZ/3DcQOu6RpQAZJKcN6hRANCAARTfmKWb8m4Yp9ymOsHozx4F7vgCTij 4 | p2TCN3orQZbze9xe17QGRLf2POfpCLsH4eFA2Ye7qnR39/9mJ3HckVSw 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_web/content/enterprise/02.cloud.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Cloud" 3 | description: "agdb cloud options: managed hosting, deployment models, and SLAs" 4 | --- 5 | 6 | The cloud solution is currently not publically available. Please contact us at [agnesoft@agnesoft.com](mailto:agnesoft@agnesoft.com). 7 | -------------------------------------------------------------------------------- /agdb_server/test_certs/test_root_ca.key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgfVzyO/hrjy9gr2IQ 3 | 5IHDZF5zTzRC9Yd/VSJLiUuaNfShRANCAATQ4SjGOMwZ3p/MovVGMVOcUncFU2Qd 4 | c3/PVmse33S+GgE4X85r5SlID1c+qKUwVNRcWKv5k3DaowaM2DIeEh4C 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/cluster/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/tsconfig/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "composite": true, 7 | "baseUrl": ".", 8 | "paths": { 9 | "@/*": ["./src/*"] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbKind.md: -------------------------------------------------------------------------------- 1 | # # DbKind 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /agdb_api/typescript/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | import { defineConfig } from "vite"; 3 | 4 | export default defineConfig({ 5 | resolve: { 6 | alias: { 7 | "@": fileURLToPath(new URL("./src", import.meta.url)), 8 | }, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | agdb_api/php/docs/**/* linguist-generated 2 | agdb_api/php/lib/**/* linguist-generated 3 | agdb_api/php/tests/QueryTest.php linguist-generated 4 | agdb_api/typescript/tests/query.test.ts linguist-generated 5 | agdb_server/openapi.json linguist-generated 6 | agdb_server/test_queries.json linguist-generated 7 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbResource.md: -------------------------------------------------------------------------------- 1 | # # DbResource 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbUserRole.md: -------------------------------------------------------------------------------- 1 | # # DbUserRole 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /agdb_web/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "github>nuxt/renovate-config-nuxt" 4 | ], 5 | "lockFileMaintenance": { 6 | "enabled": true 7 | }, 8 | "packageRules": [{ 9 | "matchDepTypes": ["resolutions"], 10 | "enabled": false 11 | }], 12 | "postUpdateOptions": ["pnpmDedupe"] 13 | } 14 | -------------------------------------------------------------------------------- /agdb_ci/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agdb_ci" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | anyhow = "1" 8 | agdb = { version = "0.12.5", path = "../agdb", features = ["serde", "openapi"] } 9 | serde = { version = "1", features = ["derive"] } 10 | serde_json = "1" 11 | utoipa = "5" 12 | -------------------------------------------------------------------------------- /agdb_api/typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES5", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "outDir": "./dist", 7 | "moduleResolution": "node", 8 | "baseUrl": ".", 9 | "lib": ["es2015"], 10 | }, 11 | "include": [ 12 | "src/**/*" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionLogic.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionLogic 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/SearchQueryAlgorithm.md: -------------------------------------------------------------------------------- 1 | # # SearchQueryAlgorithm 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /examples/server_client_typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ESNext", 4 | "sourceMap": true, 5 | "lib": ["ES2015", "DOM"], 6 | "moduleResolution": "node", 7 | "allowJs": true, 8 | "esModuleInterop": true, 9 | "outDir": "./dist" 10 | }, 11 | "include": ["main.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionModifier.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionModifier 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /agdb_api/typescript/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import eslint from "@eslint/js"; 2 | import tseslint from "typescript-eslint"; 3 | 4 | export default tseslint.config( 5 | eslint.configs.recommended, 6 | tseslint.configs.recommended, 7 | { 8 | ignores: ["**/src/openapi.d.ts", "**/.gitignore", "**/dist/"], 9 | }, 10 | ); 11 | -------------------------------------------------------------------------------- /agdb_ci/src/ci_error.rs: -------------------------------------------------------------------------------- 1 | use std::fmt::Display; 2 | 3 | #[derive(Debug)] 4 | pub(crate) struct CIError { 5 | pub(crate) description: String, 6 | } 7 | 8 | impl From for CIError { 9 | fn from(error: E) -> Self { 10 | Self { 11 | description: error.to_string(), 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/tsconfig/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/app/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /agdb_studio/app/src/assets/form.less: -------------------------------------------------------------------------------- 1 | .base-form { 2 | input[type="text"], 3 | input[type="password"] { 4 | width: 100%; 5 | padding: 0.5rem; 6 | border: 1px solid var(--color-text); 7 | margin-bottom: 10px; 8 | font-size: 1rem; 9 | } 10 | 11 | label { 12 | display: block; 13 | margin-bottom: 0.2rem; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/server_client_rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "examples_server_client" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | agdb = { version = "0.12.5", path = "../../agdb" } 8 | agdb_api = { version = "0.12.5", path = "../../agdb_api/rust" } 9 | tokio = { version = "1", features = ["full"] } 10 | anyhow = "1.0" 11 | -------------------------------------------------------------------------------- /agdb_benchmarks/src/bench_error.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug)] 2 | pub(crate) struct BenchError { 3 | #[allow(dead_code)] 4 | pub(crate) description: String, 5 | } 6 | 7 | impl From for BenchError { 8 | fn from(value: T) -> Self { 9 | Self { 10 | description: value.to_string(), 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/cluster/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/UserCredentials.md: -------------------------------------------------------------------------------- 1 | # # UserCredentials 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **password** | **string** | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/typescript/src/index.ts: -------------------------------------------------------------------------------- 1 | export type { Components } from "./openapi.d.ts"; 2 | export { 3 | QueryBuilder, 4 | CountComparison, 5 | Comparison, 6 | DbKeyOrder, 7 | convertToNativeValue, 8 | convertTo, 9 | convertToDbKeyValue, 10 | convertToDbValue, 11 | } from "./query_builder.js"; 12 | export * as AgdbApi from "./client.js"; 13 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/LoginView.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import LoginView from "./LoginView.vue"; 3 | import { mount } from "@vue/test-utils"; 4 | 5 | describe("LoginView", () => { 6 | it("renders properly", () => { 7 | const wrapper = mount(LoginView); 8 | expect(wrapper.text()).toContain("login"); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf4.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf4 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **string** | **string** | UTF-8 string | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryIdOneOf1.md: -------------------------------------------------------------------------------- 1 | # # QueryIdOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **alias** | **string** | String alias | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/HomeView.spec.ts: -------------------------------------------------------------------------------- 1 | import HomeView from "./HomeView.vue"; 2 | import { mount } from "@vue/test-utils"; 3 | import { describe, expect, it } from "vitest"; 4 | 5 | describe("HomeView", () => { 6 | it("renders properly", () => { 7 | const wrapper = mount(HomeView); 8 | expect(wrapper.find(".main-wrapper")).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/src/composables/modal/types.ts: -------------------------------------------------------------------------------- 1 | import type { Content } from "../content/types"; 2 | 3 | export type Modal = { 4 | header: string; 5 | content: Content[]; 6 | }; 7 | 8 | export type Button = { 9 | className: string; 10 | text: string; 11 | action: () => void | Promise; 12 | type?: "button" | "submit" | "reset"; 13 | }; 14 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ServerDatabaseRename.md: -------------------------------------------------------------------------------- 1 | # # ServerDatabaseRename 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **new_db** | **string** | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf1.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **i64** | **int** | 64-bit wide signed integer | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf2.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf2 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **u64** | **int** | 64-bit wide unsigned integer | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_benchmarks/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agdb_benchmarks" 3 | edition = "2024" 4 | license = "Apache-2.0" 5 | 6 | [dependencies] 7 | agdb = { version = "0.12.5", path = "../agdb" } 8 | num-format = { version = "0.4", features = ["with-serde"] } 9 | serde = { version = "1", features = ["derive"] } 10 | serde_yaml = "0.9" 11 | tokio = { version = "1", features = ["full"] } 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf8.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf8 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **vec_string** | **string[]** | List of UTF-8 strings | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | dist/ 3 | Cargo.lock 4 | **/*.rs.bk 5 | lcov.info 6 | *.agdb 7 | agdb_benchmarks.yaml 8 | agdb_server.yaml 9 | agdb_server_data/ 10 | !.github/workflows/agdb_benchmarks.yaml 11 | !.github/workflows/agdb_server.yaml 12 | test.log 13 | vendor/ 14 | coverage/ 15 | node_modules/ 16 | openapitools.json 17 | .openapi-generator/ 18 | composer.lock 19 | .vscode/ 20 | .turbo/ 21 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | members = [ 4 | "agdb", 5 | "agdb_benchmarks", 6 | "agdb_ci", 7 | "agdb_derive", 8 | "agdb_server", 9 | "agdb_api/rust", 10 | "examples/app_db", 11 | "examples/indexes", 12 | "examples/joins", 13 | "examples/schema_migration", 14 | "examples/server_client_rust", 15 | "examples/user_types", 16 | ] 17 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/UserLogin.md: -------------------------------------------------------------------------------- 1 | # # UserLogin 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **password** | **string** | | 8 | **username** | **string** | | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_web/.gitignore: -------------------------------------------------------------------------------- 1 | # Nuxt dev/build outputs 2 | .output 3 | .data 4 | .nuxt 5 | .nitro 6 | .cache 7 | dist 8 | test-results 9 | playwright-report 10 | 11 | # Node dependencies 12 | node_modules 13 | 14 | # Logs 15 | logs 16 | *.log 17 | 18 | # Misc 19 | .DS_Store 20 | .fleet 21 | .idea 22 | 23 | # Local env files 24 | .env 25 | .env.* 26 | !.env.example 27 | 28 | # VSC 29 | .history 30 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/CountComparisonOneOf.md: -------------------------------------------------------------------------------- 1 | # # CountComparisonOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **equal** | **int** | property == this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/CountComparisonOneOf1.md: -------------------------------------------------------------------------------- 1 | # # CountComparisonOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **greater_than** | **int** | property > this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/CountComparisonOneOf3.md: -------------------------------------------------------------------------------- 1 | # # CountComparisonOneOf3 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **less_than** | **int** | property < this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/CountComparisonOneOf5.md: -------------------------------------------------------------------------------- 1 | # # CountComparisonOneOf5 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **not_equal** | **int** | property != this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbTypeParam.md: -------------------------------------------------------------------------------- 1 | # # DbTypeParam 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **db_type** | [**\Agnesoft\AgdbApi\Model\DbKind**](DbKind.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **bytes** | **int[]** | Byte array, sometimes referred to as blob | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf5.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf5 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **vec_i64** | **int[]** | List of 64-bit wide signed integers | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf6.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf6 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **vec_u64** | **int[]** | List of 64-bit wide unsigned integers | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/src/components/transitions/FadeTransition.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf7.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf7 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **vec_f64** | **float[]** | List of 64-bit floating point numbers | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ChangePassword.md: -------------------------------------------------------------------------------- 1 | # # ChangePassword 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **new_password** | **string** | | 8 | **password** | **string** | | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_studio/app/src/types/graph.d.ts: -------------------------------------------------------------------------------- 1 | type GraphElementBase = { 2 | id: number; 3 | values: Record; 4 | }; 5 | 6 | type GraphNode = GraphElementBase; 7 | 8 | type GraphEdge = GraphElementBase & { 9 | from: number; 10 | to: number; 11 | }; 12 | 13 | type GraphElement = GraphNode | GraphEdge; 14 | 15 | type Graph = { 16 | result: number; 17 | elements: GraphElement[]; 18 | }; 19 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/CountComparisonOneOf2.md: -------------------------------------------------------------------------------- 1 | # # CountComparisonOneOf2 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **greater_than_or_equal** | **int** | property >= this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/CountComparisonOneOf4.md: -------------------------------------------------------------------------------- 1 | # # CountComparisonOneOf4 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **less_than_or_equal** | **int** | property <= this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbUserRoleParam.md: -------------------------------------------------------------------------------- 1 | # # DbUserRoleParam 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **db_role** | [**\Agnesoft\AgdbApi\Model\DbUserRole**](DbUserRole.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf9.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf9 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **search** | [**\Agnesoft\AgdbApi\Model\SearchQuery**](SearchQuery.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Agdb Studio 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryIdsOneOf1.md: -------------------------------------------------------------------------------- 1 | # # QueryIdsOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **search** | [**\Agnesoft\AgdbApi\Model\SearchQuery**](SearchQuery.md) | Search query | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ServerDatabaseAdminRename.md: -------------------------------------------------------------------------------- 1 | # # ServerDatabaseAdminRename 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **new_db** | **string** | | 8 | **new_owner** | **string** | | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/UserStatus.md: -------------------------------------------------------------------------------- 1 | # # UserStatus 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **admin** | **bool** | | 8 | **login** | **bool** | | 9 | **username** | **string** | | 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ClusterStatus.md: -------------------------------------------------------------------------------- 1 | # # ClusterStatus 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **address** | **string** | | 8 | **leader** | **bool** | | 9 | **status** | **bool** | | 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf3.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf3 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **less_than** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property < this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbUser.md: -------------------------------------------------------------------------------- 1 | # # DbUser 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **role** | [**\Agnesoft\AgdbApi\Model\DbUserRole**](DbUserRole.md) | | 8 | **username** | **string** | | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf1.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **insert_edges** | [**\Agnesoft\AgdbApi\Model\InsertEdgesQuery**](InsertEdgesQuery.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf3.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf3 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **insert_nodes** | [**\Agnesoft\AgdbApi\Model\InsertNodesQuery**](InsertNodesQuery.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ServerDatabaseResource.md: -------------------------------------------------------------------------------- 1 | # # ServerDatabaseResource 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **resource** | [**\Agnesoft\AgdbApi\Model\DbResource**](DbResource.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/src/components/ProfileMenu.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **equal** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property == this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf1.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **greater_than** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property > this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf5.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf5 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **not_equal** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property != this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf6.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf6 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **contains** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property.contains(this) | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf8.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf8 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **ends_with** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property.ends_with(this) | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbKeyOrderOneOf.md: -------------------------------------------------------------------------------- 1 | # # DbKeyOrderOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **asc** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Ascending order (from smallest) | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryIdsOneOf.md: -------------------------------------------------------------------------------- 1 | # # QueryIdsOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryId[]**](QueryId.md) | List of [`QueryId`]s | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **insert_alias** | [**\Agnesoft\AgdbApi\Model\InsertAliasesQuery**](InsertAliasesQuery.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf17.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf17 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_values** | [**\Agnesoft\AgdbApi\Model\SelectValuesQuery**](SelectValuesQuery.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf4.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf4 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **insert_values** | [**\Agnesoft\AgdbApi\Model\InsertValuesQuery**](InsertValuesQuery.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/app/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node18/tsconfig.json", 3 | "include": ["./**/*"], 4 | "compilerOptions": { 5 | "moduleResolution": "NodeNext", 6 | "target": "ES2020", 7 | "lib": ["ES2020", "DOM"], 8 | "strict": true, 9 | "esModuleInterop": true, 10 | "skipLibCheck": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "resolveJsonModule": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb/src/query_builder/select_indexes.rs: -------------------------------------------------------------------------------- 1 | use crate::SelectIndexesQuery; 2 | 3 | /// Select indexes builder. 4 | #[cfg_attr(feature = "api", derive(agdb::TypeDef))] 5 | pub struct SelectIndexes {} 6 | 7 | #[cfg_attr(feature = "api", agdb::impl_def())] 8 | impl SelectIndexes { 9 | /// Returns the built `SelectIndexesQuery`. 10 | pub fn query(&self) -> SelectIndexesQuery { 11 | SelectIndexesQuery {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf7.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf7 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **starts_with** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property.starts_with(this) | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbKeyOrderOneOf1.md: -------------------------------------------------------------------------------- 1 | # # DbKeyOrderOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **desc** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Descending order (from largest) | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/cluster/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf4.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf4 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **less_than_or_equal** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property <= this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf12.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf12 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_edge_count** | [**\Agnesoft\AgdbApi\Model\SelectEdgeCountQuery**](SelectEdgeCountQuery.md) | | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": [ 4 | "env.d.ts", 5 | "src/**/*", 6 | "src/**/*.vue", 7 | "src/**/*.ts", 8 | "e2e/**/*.ts", 9 | "e2e-utils/**/*.ts" 10 | ], 11 | "compilerOptions": { 12 | "typeRoots": ["node_modules", "types"], 13 | "baseUrl": ".", 14 | "paths": { 15 | "@/*": ["./src/*"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/src/components/icons/LogoIcon.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | base: "/studio/", 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ComparisonOneOf2.md: -------------------------------------------------------------------------------- 1 | # # ComparisonOneOf2 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **greater_than_or_equal** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | property >= this | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb/src/query_builder/remove_ids.rs: -------------------------------------------------------------------------------- 1 | use crate::RemoveQuery; 2 | 3 | /// Final builder that lets you create 4 | /// an actual query object. 5 | #[cfg_attr(feature = "api", derive(agdb::TypeDef))] 6 | pub struct RemoveIds(pub RemoveQuery); 7 | 8 | #[cfg_attr(feature = "api", agdb::impl_def())] 9 | impl RemoveIds { 10 | /// Returns the built `RemoveQuery` object. 11 | pub fn query(self) -> RemoveQuery { 12 | self.0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf2.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf2 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **insert_index** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Query to create a new index on a given key. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf7.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf7 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **remove_index** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Query to create a new index on a given key. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@agdb-studio/tsconfig/tsconfig.app.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.ts"], 4 | "compilerOptions": { 5 | "typeRoots": ["node_modules", "src/types"], 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | }, 10 | "declaration": true, 11 | "emitDeclarationOnly": true, 12 | "outDir": "dist" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb_web/content/enterprise/05.sponsors.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Sponsors" 3 | description: "Sponsor agdb: help fund development and shape roadmap" 4 | --- 5 | 6 | The sponsorship is available on GitHub at: 7 | 8 | https://github.com/sponsors/michaelvlach 9 | 10 | If you would like to become an official sponsor, get recognition on the homepage as well as in the repository please reach out to: 11 | 12 | [agnesoft@agnesoft.com](mailto:agnesoft@agnesoft.com) 13 | -------------------------------------------------------------------------------- /agdb_web/app/components/AppHeader.nuxt.spec.ts: -------------------------------------------------------------------------------- 1 | import { mountSuspended } from "@nuxt/test-utils/runtime"; 2 | import AppHeader from "./AppHeader.vue"; 3 | import { describe, it, expect } from "vitest"; 4 | 5 | describe("AppHeader", () => { 6 | it("renders navigation links", async () => { 7 | const wrapper = await mountSuspended(AppHeader); 8 | const links = wrapper.findAll("a"); 9 | expect(links.length).toBeGreaterThan(0); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryAudit.md: -------------------------------------------------------------------------------- 1 | # # QueryAudit 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **query** | [**\Agnesoft\AgdbApi\Model\QueryType**](QueryType.md) | | 8 | **timestamp** | **int** | | 9 | **username** | **string** | | 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf4.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf4 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryId[]**](QueryId.md) | Tests if the current id is in the list of ids. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_web/content/docs/01.guides/05.troubleshooting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Troubleshooting" 3 | description: "Troubleshooting common agdb issues: CORS, setup, clients" 4 | --- 5 | 6 | ## Getting cross-origin (CORS) errors when connecting to the `agdb_server` 7 | 8 | CORS error can happen even locally when running the server and connecting to it using raw IP address (e.g. `127.0.0.1`). Try running the server and binding it to `localhost` (default) or another DNS name instead. 9 | -------------------------------------------------------------------------------- /agdb/src/query_builder/select_ids.rs: -------------------------------------------------------------------------------- 1 | use crate::SelectValuesQuery; 2 | 3 | /// Final builder that lets you create 4 | /// an actual query object. 5 | #[cfg_attr(feature = "api", derive(agdb::TypeDef))] 6 | pub struct SelectIds(pub SelectValuesQuery); 7 | 8 | #[cfg_attr(feature = "api", agdb::impl_def())] 9 | impl SelectIds { 10 | /// Returns the built `SelectQuery` object. 11 | pub fn query(self) -> SelectValuesQuery { 12 | self.0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb/src/query_builder/select_node_count.rs: -------------------------------------------------------------------------------- 1 | use crate::query::select_node_count::SelectNodeCountQuery; 2 | 3 | /// Select node count builder. 4 | #[cfg_attr(feature = "api", derive(agdb::TypeDef))] 5 | pub struct SelectNodeCount {} 6 | 7 | #[cfg_attr(feature = "api", agdb::impl_def())] 8 | impl SelectNodeCount { 9 | /// Returns the `SelectNodeCountQuery` object. 10 | pub fn query(self) -> SelectNodeCountQuery { 11 | SelectNodeCountQuery {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /agdb_studio/app/e2e-utils/screenshots.ts: -------------------------------------------------------------------------------- 1 | import { type Page } from "@playwright/test"; 2 | 3 | export const takeScreenshot = async ( 4 | page: Page, 5 | name: string, 6 | _testName?: string, 7 | ): Promise => { 8 | const testName = _testName || "screenshot"; 9 | const path = `./screenshots/${testName}/${name.replace(/[^a-z0-9]/gi, "_").toLowerCase()}.png`; 10 | await page.context().storageState({ path }); 11 | await page.screenshot({ path }); 12 | }; 13 | -------------------------------------------------------------------------------- /agdb/src/query_builder/insert_index.rs: -------------------------------------------------------------------------------- 1 | use crate::DbValue; 2 | use crate::InsertIndexQuery; 3 | 4 | /// Final step in the insert index query builder. 5 | #[cfg_attr(feature = "api", derive(agdb::TypeDef))] 6 | pub struct InsertIndex(pub DbValue); 7 | 8 | #[cfg_attr(feature = "api", agdb::impl_def())] 9 | impl InsertIndex { 10 | /// Returns the built `InsertIndexQuery`. 11 | pub fn query(self) -> InsertIndexQuery { 12 | InsertIndexQuery(self.0) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb/src/query_builder/remove_index.rs: -------------------------------------------------------------------------------- 1 | use crate::DbValue; 2 | use crate::RemoveIndexQuery; 3 | 4 | /// Final step in the remove index query builder. 5 | #[cfg_attr(feature = "api", derive(agdb::TypeDef))] 6 | pub struct RemoveIndex(pub DbValue); 7 | 8 | #[cfg_attr(feature = "api", agdb::impl_def())] 9 | impl RemoveIndex { 10 | /// Returns the built `RemoveIndexQuery`. 11 | pub fn query(self) -> RemoveIndexQuery { 12 | RemoveIndexQuery(self.0) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/AdminStatus.md: -------------------------------------------------------------------------------- 1 | # # AdminStatus 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **dbs** | **int** | | 8 | **logged_in_users** | **int** | | 9 | **size** | **int** | | 10 | **uptime** | **int** | | 11 | **users** | **int** | | 12 | 13 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 14 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf6.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf6 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **keys** | [**\Agnesoft\AgdbApi\Model\DbValue[]**](DbValue.md) | Test if the current element has **all** of the keys listed. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/SelectValuesQuery.md: -------------------------------------------------------------------------------- 1 | # # SelectValuesQuery 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | | 8 | **keys** | [**\Agnesoft\AgdbApi\Model\DbValue[]**](DbValue.md) | | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/InsertAliasesQuery.md: -------------------------------------------------------------------------------- 1 | # # InsertAliasesQuery 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **aliases** | **string[]** | Aliases to be inserted | 8 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Ids to be aliased | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf7.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf7 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **where** | [**\Agnesoft\AgdbApi\Model\QueryCondition[]**](QueryCondition.md) | Nested list of conditions (equivalent to brackets). | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb/src/query_builder/remove_aliases.rs: -------------------------------------------------------------------------------- 1 | use crate::RemoveAliasesQuery; 2 | 3 | /// Final builder that lets you create 4 | /// an actual query object. 5 | #[cfg_attr(feature = "api", derive(agdb::TypeDef))] 6 | pub struct RemoveAliases(pub RemoveAliasesQuery); 7 | 8 | #[cfg_attr(feature = "api", agdb::impl_def())] 9 | impl RemoveAliases { 10 | /// Returns the built `RemoveAliasesQuery` object. 11 | pub fn query(self) -> RemoveAliasesQuery { 12 | self.0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/admin/AdminDbView.spec.ts: -------------------------------------------------------------------------------- 1 | import { vi, describe, it, beforeEach, expect } from "vitest"; 2 | import AdminDbView from "./AdminDbView.vue"; 3 | import { shallowMount } from "@vue/test-utils"; 4 | 5 | describe("AdminDbView", () => { 6 | beforeEach(() => { 7 | vi.clearAllMocks(); 8 | }); 9 | it("renders the admin db view", () => { 10 | const wrapper = shallowMount(AdminDbView); 11 | expect(wrapper.html()).toContain("db-view"); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /agdb_web/content/api-docs/01.openapi.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "OpenAPI" 3 | description: "OpenAPI specification for agdb server and language clients" 4 | --- 5 | 6 | The [agdb server](/docs/references/server) can be accessed using OpenAPI (REST) via any HTTP client. In addition to the API specification `agdb` offers wide range of clients for many languages that uses the same API but provides convenience and ease-of-use: 7 | 8 | ::language-icons 9 | :: 10 | 11 | ::open-api-code-block 12 | :: 13 | -------------------------------------------------------------------------------- /agdb_studio/app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node18/tsconfig.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "cypress.config.*", 7 | "nightwatch.conf.*", 8 | "playwright.config.*", 9 | "globals.d.ts" 10 | ], 11 | "compilerOptions": { 12 | "composite": true, 13 | "module": "ESNext", 14 | "moduleResolution": "Bundler", 15 | "types": ["node"], 16 | "typeRoots": ["node_modules", "types"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbKeyValue.md: -------------------------------------------------------------------------------- 1 | # # DbKeyValue 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **key** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Key of the property | 8 | **value** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Value of the property | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryValuesOneOf.md: -------------------------------------------------------------------------------- 1 | # # QueryValuesOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **single** | [**\Agnesoft\AgdbApi\Model\DbKeyValue[]**](DbKeyValue.md) | Single list of properties (key-value pairs) to be applied to all elements in a query. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryIds.md: -------------------------------------------------------------------------------- 1 | # # QueryIds 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryId[]**](QueryId.md) | List of [`QueryId`]s | 8 | **search** | [**\Agnesoft\AgdbApi\Model\SearchQuery**](SearchQuery.md) | Search query | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_studio/app/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | esbuild: { 15 | supported: { 16 | "top-level-await": true, 17 | }, 18 | }, 19 | base: "/studio/", 20 | }); 21 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **distance** | [**\Agnesoft\AgdbApi\Model\CountComparison**](CountComparison.md) | Distance from the search origin. Takes count comparison (e.g. Equal, GreaterThan). | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryResult.md: -------------------------------------------------------------------------------- 1 | # # QueryResult 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **elements** | [**\Agnesoft\AgdbApi\Model\DbElement[]**](DbElement.md) | List of elements yielded by the query possibly with a list of properties. | 8 | **result** | **int** | Query result | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbKeyOrder.md: -------------------------------------------------------------------------------- 1 | # # DbKeyOrder 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **asc** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Ascending order (from smallest) | 8 | **desc** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Descending order (from largest) | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/tsconfig/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node18/tsconfig.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "cypress.config.*", 7 | "nightwatch.conf.*", 8 | "playwright.config.*", 9 | "globals.d.ts" 10 | ], 11 | "compilerOptions": { 12 | "composite": true, 13 | "module": "ESNext", 14 | "moduleResolution": "Bundler", 15 | "types": ["node", "types"], 16 | "typeRoots": ["node_modules", "src/types"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/src/components/transitions/SlideUpTransition.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 21 | -------------------------------------------------------------------------------- /agdb_api/typescript/test.sh: -------------------------------------------------------------------------------- 1 | rm -f agdb_server.yaml 2 | rm -rf agdb_server_data 3 | cargo build -r -p agdb_server 4 | cargo run -r -p agdb_server & 5 | 6 | pnpm exec vitest run --coverage 7 | error_code=$? 8 | 9 | token=$(curl -X POST http://localhost:3000/api/v1/user/login -H "Content-Type: application/json" -d '{"username":"admin","password":"admin"}') 10 | curl -H "Authorization: Bearer $token" -X POST http://localhost:3000/api/v1/admin/shutdown 11 | 12 | rm -f agdb_server.yaml 13 | rm -rf agdb_server_data 14 | 15 | exit $error_code 16 | -------------------------------------------------------------------------------- /agdb_studio/app/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./assets/main.css"; 2 | 3 | import { createApp } from "vue"; 4 | 5 | import App from "./App.vue"; 6 | import { createRouter } from "@agdb-studio/router/src/router"; 7 | import { createWebHistory } from "vue-router"; 8 | import { createRoutes } from "./router/routes"; 9 | 10 | const router = createRouter({ 11 | history: createWebHistory(import.meta.env.BASE_URL), 12 | routes: createRoutes(), 13 | }); 14 | 15 | const app = createApp(App); 16 | 17 | app.use(router); 18 | 19 | app.mount("#app"); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | // "@": path.resolve(__dirname, "./src"), // fileURLToPath(new URL("./src", import.meta.url)), 13 | }, 14 | }, 15 | base: "/studio/", 16 | }); 17 | -------------------------------------------------------------------------------- /agdb_web/content/docs/01.guides/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Guides" 3 | description: "Guides for agdb: concepts, quickstarts, server deployment, studio, and troubleshooting" 4 | --- 5 | 6 | The following guides are guided examples of usage of the agdb: 7 | 8 | - [Concepts](/docs/guides/concepts) 9 | 10 | - [Quickstart](/docs/guides/quickstart) 11 | 12 | - [How to run a server?](/docs/guides/how-to-run-server) 13 | 14 | - [How to use the studio?](/docs/guides/how-to-use-studio) 15 | 16 | - [Troubleshooting](/docs/guides/troubleshooting) 17 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/KeyValueComparison.md: -------------------------------------------------------------------------------- 1 | # # KeyValueComparison 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **key** | [**\Agnesoft\AgdbApi\Model\DbValue**](DbValue.md) | Property key | 8 | **value** | [**\Agnesoft\AgdbApi\Model\Comparison**](Comparison.md) | Comparison operator (e.g. Equal, GreaterThan etc.) | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryValuesOneOf1.md: -------------------------------------------------------------------------------- 1 | # # QueryValuesOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **multi** | **\Agnesoft\AgdbApi\Model\DbKeyValue[][]** | List of lists of properties (key-value pairs) to be applied to all elements in a query. There must be as many lists of properties as ids in a query. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/NotFoundView.spec.ts: -------------------------------------------------------------------------------- 1 | import { vi, describe, it, beforeEach, expect } from "vitest"; 2 | import NotFoundView from "./NotFoundView.vue"; 3 | import { shallowMount } from "@vue/test-utils"; 4 | 5 | describe("NotFoundView", () => { 6 | beforeEach(() => { 7 | vi.clearAllMocks(); 8 | }); 9 | it("renders the not found view", () => { 10 | const wrapper = shallowMount(NotFoundView); 11 | expect(wrapper.text()).toContain("404"); 12 | expect(wrapper.text()).toContain("Page not found"); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /examples/server_client_typescript/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import eslint from "@eslint/js"; 2 | import typescriptEslint from "typescript-eslint"; 3 | 4 | export default typescriptEslint.config({ 5 | extends: [ 6 | eslint.configs.recommended, 7 | ...typescriptEslint.configs.recommended, 8 | ], 9 | languageOptions: { 10 | ecmaVersion: "latest", 11 | sourceType: "module", 12 | // globals: globals.browser, 13 | parserOptions: { 14 | parser: typescriptEslint.parser, 15 | }, 16 | }, 17 | files: ["**/*.ts"], 18 | }); 19 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf3.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf3 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **edge_count_to** | [**\Agnesoft\AgdbApi\Model\CountComparison**](CountComparison.md) | Tests the number of incoming edges (to) of the current element. Takes count comparison (e.g. Equal, GreaterThan). | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/src/composables/admin.ts: -------------------------------------------------------------------------------- 1 | import { computed } from "vue"; 2 | import { useAccount } from "@agdb-studio/auth/src/account"; 3 | import { getRouter } from "@agdb-studio/router/src/router"; 4 | 5 | const { admin } = useAccount(); 6 | 7 | const isAdmin = computed(() => { 8 | return admin.value; 9 | }); 10 | 11 | const isAdminView = computed(() => { 12 | return !!getRouter().currentRoute.value.meta.admin; 13 | }); 14 | 15 | export const useAdmin = () => { 16 | return { isAdmin, isAdminView }; 17 | }; 18 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf2.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf2 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **edge_count_from** | [**\Agnesoft\AgdbApi\Model\CountComparison**](CountComparison.md) | Tests the number of outgoing edges (from) of the current element. Takes count comparison (e.g. Equal, GreaterThan). | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/src/components/icons/SpinnerIcon.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 24 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf5.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf5 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **key_value** | [**\Agnesoft\AgdbApi\Model\KeyValueComparison**](KeyValueComparison.md) | Tests if the current element has a property `key` with a value that evaluates true against `comparison`. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/InsertValuesQuery.md: -------------------------------------------------------------------------------- 1 | # # InsertValuesQuery 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Ids whose properties should be updated | 8 | **values** | [**\Agnesoft\AgdbApi\Model\QueryValues**](QueryValues.md) | Key value pairs to be inserted to the existing elements. | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf6.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf6 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **remove_aliases** | **string[]** | Query to remove aliases from the database. It is not an error if an alias to be removed already does not exist. The result will be a negative number signifying how many aliases have been actually removed. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_server/src/routes.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod admin; 2 | pub(crate) mod cluster; 3 | pub(crate) mod db; 4 | #[cfg(feature = "studio")] 5 | pub(crate) mod studio; 6 | pub(crate) mod user; 7 | 8 | use crate::server_error::ServerResult; 9 | use axum::http::StatusCode; 10 | 11 | #[utoipa::path(get, 12 | path = "/api/v1/status", 13 | operation_id = "status", 14 | tag = "agdb", 15 | responses( 16 | (status = 200, description = "Server is ready"), 17 | ) 18 | )] 19 | pub(crate) async fn status() -> ServerResult { 20 | Ok(StatusCode::OK) 21 | } 22 | -------------------------------------------------------------------------------- /examples/server_client_php/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "agnesoft/examples_server_client", 3 | "autoload": { 4 | "psr-4": { 5 | "agnesoft\\examples_server_client\\": "src/" 6 | } 7 | }, 8 | "authors": [ 9 | { 10 | "name": "Agnesoft", 11 | "homepage": "https://github.com/agnesoft/agdb" 12 | } 13 | ], 14 | "minimum-stability": "dev", 15 | "require": { 16 | "agnesoft/agdb_api": "dev-main" 17 | }, 18 | "require-dev": { 19 | "phpstan/phpstan": "^1.11" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf11.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf11 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_all_aliases** | **object** | Query to select all aliases in the database. The result will be number of returned aliases and list of elements with a single property `String(\"alias\")` holding the value `String`. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_web/content/docs/03.references/00.index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Overview" 3 | description: "Reference docs for agdb: queries, server, studio, performance, and cloud" 4 | --- 5 | 6 | In this section you will find complete references of all aspects of `agdb` including full reference of queries, and other aspects of `agdb`: 7 | 8 | - [Queries](references/queries) 9 | 10 | - [Server](references/server) 11 | 12 | - [Studio](references/studio) 13 | 14 | - [Cloud](references/cloud) 15 | 16 | - [Efficient agdb](references/efficient-agdb) 17 | 18 | - [Performance](references/performance) 19 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/ServerDatabase.md: -------------------------------------------------------------------------------- 1 | # # ServerDatabase 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **backup** | **int** | | 8 | **db** | **string** | | 9 | **db_type** | [**\Agnesoft\AgdbApi\Model\DbKind**](DbKind.md) | | 10 | **owner** | **string** | | 11 | **role** | [**\Agnesoft\AgdbApi\Model\DbUserRole**](DbUserRole.md) | | 12 | **size** | **int** | | 13 | 14 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 15 | -------------------------------------------------------------------------------- /agdb_studio/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | test-results/ 31 | playwright-report/ 32 | /test-results/ 33 | /playwright-report/ 34 | /blob-report/ 35 | /playwright/.cache/ 36 | screenshots/ 37 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryConditionDataOneOf1.md: -------------------------------------------------------------------------------- 1 | # # QueryConditionDataOneOf1 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **edge_count** | [**\Agnesoft\AgdbApi\Model\CountComparison**](CountComparison.md) | Tests number of edges (from+to) of the current element. Only nodes will pass. Self-referential edges are counted twice. Takes count comparison (e.g. Equal, GreaterThan). | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@agdb-studio/tsconfig", 3 | "version": "1.0.0", 4 | "description": "Configuration library for AGDB Studio", 5 | "type": "module", 6 | "scripts": {}, 7 | "dependencies": {}, 8 | "devDependencies": { 9 | "@rushstack/eslint-patch": "catalog:", 10 | "@tsconfig/node18": "catalog:", 11 | "@types/node": "catalog:", 12 | "eslint": "catalog:", 13 | "eslint-plugin-vue": "catalog:", 14 | "prettier": "catalog:", 15 | "typescript": "catalog:", 16 | "vite": "catalog:", 17 | "vitest": "catalog:" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/src/components/icons/icons.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from "@vue/test-utils"; 2 | import SpinnerIcon from "./SpinnerIcon.vue"; 3 | import LogoIcon from "./LogoIcon.vue"; 4 | import { describe, expect, it } from "vitest"; 5 | 6 | describe("icons", () => { 7 | it("renders properly SpinnerIcon", () => { 8 | const wrapper = mount(SpinnerIcon); 9 | expect(wrapper.find("svg").exists()).toBe(true); 10 | }); 11 | it("renders properly LogoIcon", () => { 12 | const wrapper = mount(LogoIcon); 13 | expect(wrapper.find("img").exists()).toBe(true); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /agdb_web/content/enterprise/04.support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Support" 3 | description: "Enterprise support for agdb: SLAs, priority fixes, and guidance" 4 | --- 5 | 6 | We offer following support channels: 7 | 8 | - [Technical Consultation](#technical-consultation) 9 | - Post a question in [r/agdb](https://www.reddit.com/r/agdb/) subreddit. 10 | - Open a [discussion](https://github.com/agnesoft/agdb/discussions). 11 | - Open an [issue](https://github.com/agnesoft/agdb/issues). 12 | 13 | For additional or dedicated support please contact us at: 14 | 15 | [agnesoft@agnesoft.com](mailto:agnesoft@agnesoft.com) 16 | -------------------------------------------------------------------------------- /agdb_studio/app/e2e-utils/interaction.ts: -------------------------------------------------------------------------------- 1 | import { type Page } from "@playwright/test"; 2 | 3 | export const getTestIdSelector = (testId: string): string => { 4 | return `[data-testid="${testId}"]`; 5 | }; 6 | 7 | export const click = async (page: Page, testId: string): Promise => { 8 | const selector = getTestIdSelector(testId); 9 | await page.click(selector); 10 | }; 11 | 12 | export const fillInput = async ( 13 | page: Page, 14 | testId: string, 15 | value: string, 16 | ): Promise => { 17 | const selector = getTestIdSelector(testId); 18 | await page.fill(selector, value); 19 | }; 20 | -------------------------------------------------------------------------------- /agdb_web/content/blog/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Blog" 3 | description: "agdb blog: architecture insights, performance notes, and design rationale" 4 | --- 5 | 6 | Articles written about the `agdb` and related topics adding insights into technologies and thinking behind the database. 7 | 8 | ## Articles 9 | 10 | - [Distance](/blog/distance) 11 | 12 | - [Why graph?](/blog/why-graph) 13 | 14 | - [Object queries](/blog/object-queries) 15 | 16 | - [Single file](/blog/single-file) 17 | 18 | - [Replication, sharding and performance](/blog/replication-sharding-performance) 19 | 20 | - [Why not SQL?](/blog/why-not-sql) 21 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/api/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/router/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/db/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryIdOneOf.md: -------------------------------------------------------------------------------- 1 | # # QueryIdOneOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **int** | Database id is a wrapper around `i64`. The id is an identifier of a database element both nodes and edges. The positive ids represent nodes, negative ids represent edges. The value of `0` is logically invalid (there cannot be element with id 0) and a default. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf14.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf14 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_keys** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Query to select only property keys of given ids. All of the ids must exist in the database. The result will be number of elements returned and the list of elements with all properties except all values will be empty. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf16.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf16 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_node_count** | **object** | Query to select number of nodes in the database. The result will be 1 and elements with a single element of id 0 and a single property `String(\"node_count\")` with a value `u64` represneting number of nodes in teh database. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/cluster/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mts"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mts"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/user/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_web/app/layouts/docs.nuxt.spec.ts: -------------------------------------------------------------------------------- 1 | import { mountSuspended } from "@nuxt/test-utils/runtime"; 2 | import DocsLayout from "./docs.vue"; 3 | import { describe, it, expect } from "vitest"; 4 | 5 | describe("DocsLayout", () => { 6 | it("mounts and renders aside", async () => { 7 | const wrapper = await mountSuspended(DocsLayout, { 8 | global: { 9 | provide: { 10 | navigation: [], 11 | }, 12 | stubs: ["UContainer", "UPage", "UPageAside", "UContentNavigation"], 13 | }, 14 | }); 15 | expect(wrapper.findComponent({ name: "UPageAside" })).toBeTruthy(); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /agdb_server/src/action/cluster_logout.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct ClusterLogout {} 12 | 13 | impl Action for ClusterLogout { 14 | async fn exec(self, db: ServerDb, _db_pool: DbPool) -> ServerResult { 15 | db.reset_tokens().await?; 16 | 17 | Ok(ClusterActionResult::None) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/notification/vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig, mergeConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config.mjs"; 3 | import vitestShared from "@agdb-studio/testing/vitest.shared"; 4 | import path from "path"; 5 | 6 | export default mergeConfig( 7 | mergeConfig(viteConfig, vitestShared), 8 | defineConfig({ 9 | test: { 10 | root: path.resolve(__dirname, "."), 11 | setupFiles: ["@agdb-studio/testing/vitest.setup.ts"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./src"), 16 | }, 17 | }, 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /agdb_web/app/components/AppFooter.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 24 | -------------------------------------------------------------------------------- /agdb_derive/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agdb_derive" 3 | version = "0.12.5" 4 | edition = "2024" 5 | license = "Apache-2.0" 6 | homepage = "https://github.com/agnesoft/agdb" 7 | repository = "https://github.com/agnesoft/agdb" 8 | documentation = "https://github.com/agnesoft/agdb" 9 | readme = "../README.md" 10 | description = "Agnesoft Graph Database - derive macros" 11 | keywords = ["graph", "database"] 12 | categories = ["database", "database-implementations"] 13 | 14 | [lib] 15 | proc-macro = true 16 | 17 | [dependencies] 18 | proc-macro2 = "1" 19 | quote = "1" 20 | syn = { version = "2", features = ["full", "extra-traits"] } 21 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf13.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf13 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_indexes** | **object** | Query to select all indexes in the database. The result will be number of returned indexes and single element with index 0 and the properties corresponding to the names of the indexes (keys) with `u64` values representing number of indexed values in each index. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/admin/AdminView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | 17 | 29 | -------------------------------------------------------------------------------- /agdb_ci/src/sources.rs: -------------------------------------------------------------------------------- 1 | use crate::CIError; 2 | use crate::utilities::run_command; 3 | use std::path::Path; 4 | use std::process::Command; 5 | 6 | pub(crate) fn current_version() -> Result { 7 | Ok( 8 | run_command(Command::new("git").arg("tag").arg("--sort=taggerdate"))? 9 | .trim() 10 | .lines() 11 | .last() 12 | .ok_or("tags not found")?[1..] 13 | .to_string(), 14 | ) 15 | } 16 | 17 | pub(crate) fn new_version() -> Result { 18 | Ok(std::fs::read_to_string(Path::new("Version"))? 19 | .trim() 20 | .to_string()) 21 | } 22 | -------------------------------------------------------------------------------- /agdb_server/tests/test_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBgjCCASigAwIBAgIUS3GnyT+oIgW41510c2nv4dl9gfswCgYIKoZIzj0EAwIw 3 | IDELMAkGA1UEBhMCQ1oxETAPBgNVBAoMCEFnbmVzb2Z0MCAXDTc1MDEwMTAwMDAw 4 | MFoYDzQwOTYwMTAxMDAwMDAwWjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwWTATBgcq 5 | hkjOPQIBBggqhkjOPQMBBwNCAAQzetUbU9vq9WI5fLjw7dh0MWkTLlmW0aptniME 6 | j4FcsjITMmK/BZqps2j93OIwRj5QkScsKVgqD1wPPVmFcVZPo0owSDAfBgNVHSME 7 | GDAWgBQLLBRvCOdD6uE/1c4ypBdMDkMb6TAUBgNVHREEDTALgglsb2NhbGhvc3Qw 8 | DwYDVR0PAQH/BAUDAweAADAKBggqhkjOPQQDAgNIADBFAiAbxzqZB4dEmpsdJN+J 9 | msIzRVfX8YZW6yKNr8jMPHsGvAIhAMmvbEXR6QRugp4IDHv7xl1riUqJaDN8pgnE 10 | L+tlwGNH 11 | -----END CERTIFICATE----- 12 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@agdb-studio/testing", 3 | "version": "1.0.0", 4 | "description": "Configuration library for AGDB Studio", 5 | "type": "module", 6 | "scripts": {}, 7 | "dependencies": {}, 8 | "devDependencies": { 9 | "@rushstack/eslint-patch": "catalog:", 10 | "@tsconfig/node18": "catalog:", 11 | "@types/node": "catalog:", 12 | "eslint": "catalog:", 13 | "eslint-plugin-vue": "catalog:", 14 | "prettier": "catalog:", 15 | "typescript": "catalog:", 16 | "vite": "catalog:", 17 | "vitest": "catalog:", 18 | "@agdb-studio/tsconfig": "workspace:*" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryId.md: -------------------------------------------------------------------------------- 1 | # # QueryId 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **int** | Database id is a wrapper around `i64`. The id is an identifier of a database element both nodes and edges. The positive ids represent nodes, negative ids represent edges. The value of `0` is logically invalid (there cannot be element with id 0) and a default. | 8 | **alias** | **string** | String alias | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/SelectEdgeCountQuery.md: -------------------------------------------------------------------------------- 1 | # # SelectEdgeCountQuery 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **from** | **bool** | If set to `true` the query will count outgoing edges from the nodes. | 8 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Ids of the nodes to select edge count for. | 9 | **to** | **bool** | If set to `true` the query will count incoming edges to the nodes. | 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /agdb_server/tests/test_root_ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBhzCCAS2gAwIBAgIUZ8y6umm43omemq3+v2u/1DcrlKowCgYIKoZIzj0EAwIw 3 | IDELMAkGA1UEBhMCQ1oxETAPBgNVBAoMCEFnbmVzb2Z0MCAXDTc1MDEwMTAwMDAw 4 | MFoYDzQwOTYwMTAxMDAwMDAwWjAgMQswCQYDVQQGEwJDWjERMA8GA1UECgwIQWdu 5 | ZXNvZnQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARTfmKWb8m4Yp9ymOsHozx4 6 | F7vgCTijp2TCN3orQZbze9xe17QGRLf2POfpCLsH4eFA2Ye7qnR39/9mJ3HckVSw 7 | o0MwQTAPBgNVHQ8BAf8EBQMDB4YAMB0GA1UdDgQWBBQLLBRvCOdD6uE/1c4ypBdM 8 | DkMb6TAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMCA0gAMEUCIGRcAJcJcqmF 9 | wyvYApbz5XO0RZhABp1UFnpVhPlxhraIAiEA/beON8qOQKGT4h7PPTCM1i49pELa 10 | odGlu58oaEN++Bg= 11 | -----END CERTIFICATE----- 12 | -------------------------------------------------------------------------------- /agdb_server/test_certs/test_root_ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBhzCCAS2gAwIBAgIUJjJcD95GcLgWPCRJ6UV9pKy+eoEwCgYIKoZIzj0EAwIw 3 | IDELMAkGA1UEBhMCQ1oxETAPBgNVBAoMCEFnbmVzb2Z0MCAXDTc1MDEwMTAwMDAw 4 | MFoYDzQwOTYwMTAxMDAwMDAwWjAgMQswCQYDVQQGEwJDWjERMA8GA1UECgwIQWdu 5 | ZXNvZnQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATQ4SjGOMwZ3p/MovVGMVOc 6 | UncFU2Qdc3/PVmse33S+GgE4X85r5SlID1c+qKUwVNRcWKv5k3DaowaM2DIeEh4C 7 | o0MwQTAPBgNVHQ8BAf8EBQMDB4YAMB0GA1UdDgQWBBSZHTmA/6hSFt/xS1LsKm0A 8 | 8jqk/zAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMCA0gAMEUCIC5hzray0ggD 9 | nJJj3VKNwZMqrV2LgHznzsrPd6elaqnOAiEAsS51yP9dbNDzqihiSFbpX/kN/qMo 10 | eOOHbHpqT+z/BD4= 11 | -----END CERTIFICATE----- 12 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "tasks": { 4 | "build": { 5 | "outputs": [ 6 | "dist/**", 7 | ".output/**" 8 | ], 9 | "dependsOn": [ 10 | "^build" 11 | ] 12 | }, 13 | "dev": { 14 | "persistent": true, 15 | "cache": false 16 | }, 17 | "format": {}, 18 | "format:check": {}, 19 | "lint": {}, 20 | "lint:check": {}, 21 | "test": {}, 22 | "type-check": {}, 23 | "test:e2e": {}, 24 | "before-commit": {} 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf10.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf10 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_aliases** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Query to select aliases of given ids. All of the ids must exist in the database and have an alias. The result will be number of returned aliases and list of elements with a single property `String(\"alias\")` holding the value `String`. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/CountComparison.md: -------------------------------------------------------------------------------- 1 | # # CountComparison 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **equal** | **int** | property == this | 8 | **greater_than** | **int** | property > this | 9 | **greater_than_or_equal** | **int** | property >= this | 10 | **less_than** | **int** | property < this | 11 | **less_than_or_equal** | **int** | property <= this | 12 | **not_equal** | **int** | property != this | 13 | 14 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 15 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/DbValueOneOf3.md: -------------------------------------------------------------------------------- 1 | # # DbValueOneOf3 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **f64** | **float** | Database float is a wrapper around `f64` to provide functionality like comparison. The comparison is using `total_cmp` standard library function. See its [docs](https://doc.rust-lang.org/std/primitive.f64.html#method.total_cmp) to understand how it handles NaNs and other edge cases of floating point numbers. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_server/test_certs/test_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBkjCCATigAwIBAgIUWn53f4/6yjv4D0IN6wbuVZT6TnUwCgYIKoZIzj0EAwIw 3 | IDELMAkGA1UEBhMCQ1oxETAPBgNVBAoMCEFnbmVzb2Z0MCAXDTc1MDEwMTAwMDAw 4 | MFoYDzQwOTYwMTAxMDAwMDAwWjAPMQ0wCwYDVQQDDARhZ2RiMFkwEwYHKoZIzj0C 5 | AQYIKoZIzj0DAQcDQgAEelFkLeUctCc1clecbmx0DWUteWdiv8JkIQiqtjUdLJJG 6 | 4vpijgCUcl2TSGMMg6L7bZuIyyQYr3+6c0+zBC6pNaNfMF0wHwYDVR0jBBgwFoAU 7 | mR05gP+oUhbf8UtS7CptAPI6pP8wKQYDVR0RBCIwIIIJbG9jYWxob3N0ggVhZ2Ri 8 | MIIFYWdkYjGCBWFnZGIyMA8GA1UdDwEB/wQFAwMHgAAwCgYIKoZIzj0EAwIDSAAw 9 | RQIhANHGxb1oxa1uAAU2Uj5imdhgM0Mn2t8ktuCoWgdQKeWsAiBur3oFUJtKjv+N 10 | 9iDIRC+SNSg9fp0SAgj4OZ7ia0Ogeg== 11 | -----END CERTIFICATE----- 12 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf15.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf15 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **select_key_count** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Query to select number of properties (key count) of given ids. All of the ids must exist in the database. The result will be number of elements returned and the list of elements with a single property `String(\"key_count\")` with a value `u64`. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf8.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf8 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **remove_values** | [**\Agnesoft\AgdbApi\Model\SelectValuesQuery**](SelectValuesQuery.md) | Query to remove properties from existing elements in the database. All of the specified `ids` must exist in the database however they do not need to have all the listed keys (it is NOT an error if any or all keys do not exist on any of the elements). | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/e2e/example.spec.ts: -------------------------------------------------------------------------------- 1 | import { test, expect } from '@playwright/test'; 2 | 3 | test('has title', async ({ page }) => { 4 | await page.goto('https://playwright.dev/'); 5 | 6 | // Expect a title "to contain" a substring. 7 | await expect(page).toHaveTitle(/Playwright/); 8 | }); 9 | 10 | test('get started link', async ({ page }) => { 11 | await page.goto('https://playwright.dev/'); 12 | 13 | // Click the get started link. 14 | await page.getByRole('link', { name: 'Get started' }).click(); 15 | 16 | // Expects page to have a heading with the name of Installation. 17 | await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible(); 18 | }); 19 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/NotFoundView.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 31 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryTypeOneOf5.md: -------------------------------------------------------------------------------- 1 | # # QueryTypeOneOf5 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **remove** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Query to remove database elements (nodes & edges). It is not an error if any of the `ids` do not already exist. All properties associated with a given element are also removed. If removing nodes all of its incoming and outgoing edges are also removed along with their properties. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryValues.md: -------------------------------------------------------------------------------- 1 | # # QueryValues 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **single** | [**\Agnesoft\AgdbApi\Model\DbKeyValue[]**](DbKeyValue.md) | Single list of properties (key-value pairs) to be applied to all elements in a query. | 8 | **multi** | **\Agnesoft\AgdbApi\Model\DbKeyValue[][]** | List of lists of properties (key-value pairs) to be applied to all elements in a query. There must be as many lists of properties as ids in a query. | 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /.github/workflows/agdb_benchmarks.yaml: -------------------------------------------------------------------------------- 1 | name: agdb_benchmarks 2 | 3 | on: 4 | pull_request: 5 | branches: ["main"] 6 | paths: 7 | - agdb_benchmarks/** 8 | - agdb/** 9 | - agdb_derive/** 10 | - .github/workflows/agdb_benchmarks.yaml 11 | 12 | jobs: 13 | agdb_benchmarks: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: actions-rust-lang/setup-rust-toolchain@v1 18 | with: 19 | components: rustfmt,clippy 20 | - run: cargo fmt -p agdb_benchmarks --check 21 | - run: cargo clippy -p agdb_benchmarks --all-targets --all-features -- -D warnings 22 | - run: cargo run -p agdb_benchmarks -r 23 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/src/composables/types.ts: -------------------------------------------------------------------------------- 1 | import { queryApiMock } from "../mock/queryApiMock"; 2 | 3 | export type QueryType = keyof typeof queryApiMock; 4 | 5 | export type QueryStep = { 6 | id: string; 7 | type: QueryType; 8 | values?: string[]; 9 | }; 10 | 11 | export type AddQueryParams = { 12 | id: string; 13 | name?: string; 14 | }; 15 | 16 | export type Query = { 17 | isRunning: boolean; 18 | lastRun?: Date; 19 | steps: { 20 | exec: QueryStep[]; 21 | exec_mut: QueryStep[]; 22 | context: QueryStep[]; 23 | }; 24 | } & AddQueryParams; 25 | 26 | export const TABS = ["exec", "exec_mut", "context"] as const; 27 | 28 | export type TAB = (typeof TABS)[number]; 29 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_optimize.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct DbOptimize { 12 | pub(crate) owner: String, 13 | pub(crate) db: String, 14 | } 15 | 16 | impl Action for DbOptimize { 17 | async fn exec(self, _db: ServerDb, db_pool: DbPool) -> ServerResult { 18 | db_pool.optimize_db(&self.owner, &self.db).await?; 19 | 20 | Ok(ClusterActionResult::None) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/InsertNodesQuery.md: -------------------------------------------------------------------------------- 1 | # # InsertNodesQuery 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **aliases** | **string[]** | Aliases of the new nodes. | 8 | **count** | **int** | Number of nodes to be inserted. | 9 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Optional ids of nodes (optionally a search sub-query). This can be empty. | 10 | **values** | [**\Agnesoft\AgdbApi\Model\QueryValues**](QueryValues.md) | Key value pairs to be associated with the new nodes. | 11 | 12 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 13 | -------------------------------------------------------------------------------- /.github/workflows/pr_title.yaml: -------------------------------------------------------------------------------- 1 | name: pr_title 2 | 3 | on: 4 | pull_request: 5 | branches: ["main"] 6 | types: 7 | - edited 8 | - opened 9 | - reopened 10 | - synchronize 11 | 12 | jobs: 13 | title_check: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/github-script@v7 17 | with: 18 | script: | 19 | const regex = RegExp("^\\[(api|ci|db|docs|server|studio|tests|web)\\] .+ #[\\d]+$") 20 | const title = context.payload.pull_request.title 21 | 22 | if (!regex.test(title)) { 23 | core.setFailed(`PR title "${title}" failed to pass regex - ${regex}. Correct example: [ci] description #1`); 24 | } 25 | -------------------------------------------------------------------------------- /agdb_server/src/action/user_delete.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct UserDelete { 12 | pub(crate) user: String, 13 | } 14 | 15 | impl Action for UserDelete { 16 | async fn exec(self, db: ServerDb, db_pool: DbPool) -> ServerResult { 17 | let dbs = db.remove_user(&self.user).await?; 18 | db_pool.remove_user_dbs(&self.user, &dbs).await?; 19 | Ok(ClusterActionResult::None) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/src/components/builder/QueryStep.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | 29 | -------------------------------------------------------------------------------- /agdb_studio/app/src/assets/scrollbar.less: -------------------------------------------------------------------------------- 1 | body, 2 | html { 3 | ::-webkit-scrollbar-thumb { 4 | background-color: var(--scrollbar-thumb); 5 | border-radius: 10px; 6 | background-clip: padding-box; 7 | border: 2px solid transparent; 8 | transition: background-color 0.3s ease; 9 | } 10 | ::-webkit-scrollbar-thumb:hover { 11 | background-color: var(--scrollbar-thumb-hover); 12 | } 13 | ::-webkit-scrollbar-thumb:active { 14 | background-color: var(--scrollbar-thumb-active); 15 | } 16 | ::-webkit-scrollbar-corner { 17 | background-color: transparent; 18 | } 19 | ::-webkit-scrollbar { 20 | width: 10px; 21 | height: 10px; 22 | background: var(--scrollbar-background); 23 | border-radius: 10px; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /agdb_studio/app/src/tests/data/simpleData.json: -------------------------------------------------------------------------------- 1 | { 2 | "result": 5, 3 | "elements": [ 4 | { "id": 127, "values": [{ "key": "name", "value": "db_user47" }] }, 5 | { "id": 118, "values": [{ "key": "name", "value": "db_user49" }] }, 6 | { "id": 235, "values": [{ "key": "post", "value": "Post 1" }] }, 7 | { 8 | "id": -236, 9 | "values": [{ "key": "role", "value": "owner" }], 10 | "to": 235, 11 | "from": 127 12 | }, 13 | { 14 | "id": -235, 15 | "values": [{ "key": "role", "value": "reader" }], 16 | "to": 235, 17 | "from": 118 18 | }, 19 | { 20 | "id": -237, 21 | "values": [{ "key": "role", "value": "reader" }], 22 | "to": 235, 23 | "from": 119 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/QueryCondition.md: -------------------------------------------------------------------------------- 1 | # # QueryCondition 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **data** | [**\Agnesoft\AgdbApi\Model\QueryConditionData**](QueryConditionData.md) | Condition data (or type) defining what type of validation is to be performed. | 8 | **logic** | [**\Agnesoft\AgdbApi\Model\QueryConditionLogic**](QueryConditionLogic.md) | Logic operator (e.g. And, Or) | 9 | **modifier** | [**\Agnesoft\AgdbApi\Model\QueryConditionModifier**](QueryConditionModifier.md) | Condition modifier (e.g. None, Beyond, Not, NotBeyond) | 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /agdb_server/src/action/cluster_login.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct ClusterLogin { 12 | pub(crate) user: String, 13 | pub(crate) new_token: String, 14 | } 15 | 16 | impl Action for ClusterLogin { 17 | async fn exec(self, db: ServerDb, _db_pool: DbPool) -> ServerResult { 18 | let user_id = db.user_id(&self.user).await?; 19 | db.save_token(user_id, &self.new_token).await?; 20 | 21 | Ok(ClusterActionResult::None) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /agdb_web/content.config.ts: -------------------------------------------------------------------------------- 1 | import { defineContentConfig, defineCollection, z } from "@nuxt/content"; 2 | 3 | export default defineContentConfig({ 4 | collections: { 5 | landing: defineCollection({ 6 | type: "page", 7 | source: "index.md", 8 | }), 9 | docs: defineCollection({ 10 | type: "page", 11 | source: { 12 | include: "**", 13 | exclude: ["index.md"], 14 | }, 15 | schema: z.object({ 16 | links: z 17 | .array( 18 | z.object({ 19 | label: z.string(), 20 | icon: z.string(), 21 | to: z.string(), 22 | target: z.string().optional(), 23 | }), 24 | ) 25 | .optional(), 26 | }), 27 | }), 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /examples/server_client_typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "examples_server_client", 3 | "main": "index.js", 4 | "type": "module", 5 | "scripts": { 6 | "build": "tsc", 7 | "format": "prettier main.ts --write", 8 | "format:check": "prettier --check main.ts", 9 | "lint": "eslint --max-warnings=0 main.ts --fix", 10 | "lint:check": "eslint --max-warnings=0 main.ts", 11 | "start": "tsc && node main.js" 12 | }, 13 | "devDependencies": { 14 | "@typescript-eslint/parser": "catalog:", 15 | "eslint": "catalog:", 16 | "@eslint/js": "catalog:", 17 | "prettier": "catalog:", 18 | "typescript": "catalog:", 19 | "typescript-eslint": "catalog:" 20 | }, 21 | "dependencies": { 22 | "agdb_api": "file:../../agdb_api/typescript" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /agdb_studio/app/src/assets/main.css: -------------------------------------------------------------------------------- 1 | @import "./base.css"; 2 | 3 | #app { 4 | font-family: var(--base-font); 5 | font-weight: normal; 6 | } 7 | 8 | a { 9 | text-decoration: none; 10 | color: #ff8800; 11 | transition: 0.2s; 12 | } 13 | 14 | h1, 15 | h2, 16 | h3, 17 | h4, 18 | h5, 19 | h6 { 20 | font-family: var(--base-font); 21 | text-wrap: balance; 22 | } 23 | 24 | h1 { 25 | font-size: 1.5rem; 26 | } 27 | 28 | h2 { 29 | font-size: 1.25rem; 30 | } 31 | 32 | h3 { 33 | font-size: 1.125rem; 34 | } 35 | 36 | h4 { 37 | font-size: 1rem; 38 | } 39 | 40 | ul { 41 | list-style-type: none; 42 | padding: 0; 43 | margin: 0; 44 | } 45 | 46 | @media (hover: hover) { 47 | a:hover { 48 | opacity: 0.8; 49 | } 50 | } 51 | 52 | .emphasized { 53 | color: #ff8800; 54 | font-weight: bold; 55 | } 56 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_delete.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct DbDelete { 12 | pub(crate) owner: String, 13 | pub(crate) db: String, 14 | } 15 | 16 | impl Action for DbDelete { 17 | async fn exec(self, db: ServerDb, db_pool: DbPool) -> ServerResult { 18 | let user_id = db.user_id(&self.owner).await?; 19 | db.remove_db(user_id, &self.owner, &self.db).await?; 20 | db_pool.delete_db(&self.owner, &self.db).await?; 21 | Ok(ClusterActionResult::None) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_remove.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct DbRemove { 12 | pub(crate) owner: String, 13 | pub(crate) db: String, 14 | } 15 | 16 | impl Action for DbRemove { 17 | async fn exec(self, db: ServerDb, db_pool: DbPool) -> ServerResult { 18 | let user_id = db.user_id(&self.owner).await?; 19 | db.remove_db(user_id, &self.owner, &self.db).await?; 20 | db_pool.remove_db(&self.owner, &self.db).await?; 21 | Ok(ClusterActionResult::None) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/src/composables/table/utils.spec.ts: -------------------------------------------------------------------------------- 1 | import { dateFormatter } from "./utils"; 2 | import { describe, it, expect } from "vitest"; 3 | 4 | describe("utils", () => { 5 | describe("dateFormatter", () => { 6 | it("should return a formatted date when value is number", () => { 7 | const formattedDate = dateFormatter(1734447876); 8 | expect(formattedDate).toBe(new Date(1734447876000).toUTCString()); 9 | }); 10 | it("should return N/A when value is not a number", () => { 11 | const formattedDate = dateFormatter("not a number"); 12 | expect(formattedDate).toBe("N/A"); 13 | }); 14 | it("should return N/A when value is 0", () => { 15 | const formattedDate = dateFormatter(0); 16 | expect(formattedDate).toBe("N/A"); 17 | }); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /agdb_web/content/enterprise/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Enterprise" 3 | description: "Enterprise options for agdb: support, sponsorships, consultation, and cloud hosting" 4 | --- 5 | 6 | The `agdb` is open-source software provided as-is under [Apache 2.0 license](/license). You can obtain a commercial license that would grant you access to various services like a cloud hosted database, support for self-hosted solutions and direct general support. 7 | 8 | You can also consider [sponsoring](/enterprise/sponsors) the development of `agdb` and get mentioned on the homepage and in the repository! 9 | 10 | - [Technical Consultation](/enterprise/consultation) 11 | 12 | - [Self-hosted](/enterprise/self-hosted) 13 | 14 | - [Cloud](/enterprise/cloud) 15 | 16 | - [Support](/enterprise/support) 17 | 18 | - [Sponsors](/enterprise/sponsors) 19 | -------------------------------------------------------------------------------- /agdb_ci/src/language/php.rs: -------------------------------------------------------------------------------- 1 | use crate::CIError; 2 | use crate::utilities; 3 | use std::path::Path; 4 | use std::process::Command; 5 | 6 | pub(crate) fn generate_test_queries() -> Result<(), CIError> { 7 | println!("Generating PHP test_queries"); 8 | utilities::run_command( 9 | Command::new(utilities::BASH) 10 | .arg("ci.sh") 11 | .arg("test_queries") 12 | .current_dir(Path::new("agdb_api").join("php")), 13 | )?; 14 | Ok(()) 15 | } 16 | 17 | pub(crate) fn generate_api() -> Result<(), CIError> { 18 | println!("Generating PHP openapi"); 19 | utilities::run_command( 20 | Command::new(utilities::BASH) 21 | .arg("ci.sh") 22 | .arg("openapi") 23 | .current_dir(Path::new("agdb_api").join("php")), 24 | )?; 25 | Ok(()) 26 | } 27 | -------------------------------------------------------------------------------- /agdb_api/rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod api_error; 2 | mod api_result; 3 | mod api_types; 4 | mod client; 5 | mod http_client; 6 | 7 | pub use api_error::AgdbApiError; 8 | pub use api_result::AgdbApiResult; 9 | pub use api_types::AdminStatus; 10 | pub use api_types::ChangePassword; 11 | pub use api_types::ClusterStatus; 12 | pub use api_types::DbAudit; 13 | pub use api_types::DbKind; 14 | pub use api_types::DbResource; 15 | pub use api_types::DbUser; 16 | pub use api_types::DbUserRole; 17 | pub use api_types::Queries; 18 | pub use api_types::QueriesResults; 19 | pub use api_types::QueryAudit; 20 | pub use api_types::ServerDatabase; 21 | pub use api_types::UserCredentials; 22 | pub use api_types::UserLogin; 23 | pub use api_types::UserStatus; 24 | pub use client::AgdbApi; 25 | pub use http_client::HttpClient; 26 | pub use http_client::ReqwestClient; 27 | -------------------------------------------------------------------------------- /agdb_server/tests/routes/user_logout_test.rs: -------------------------------------------------------------------------------- 1 | use crate::ADMIN; 2 | use crate::TestServer; 3 | use crate::next_user_name; 4 | 5 | #[tokio::test] 6 | async fn logout() -> anyhow::Result<()> { 7 | let mut server = TestServer::new().await?; 8 | let owner = &next_user_name(); 9 | server.api.user_login(ADMIN, ADMIN).await?; 10 | server.api.admin_user_add(owner, owner).await?; 11 | server.api.user_login(owner, owner).await?; 12 | let status = server.api.user_logout().await?; 13 | assert_eq!(status, 201); 14 | assert_eq!(server.api.token, None); 15 | Ok(()) 16 | } 17 | 18 | #[tokio::test] 19 | async fn no_token() -> anyhow::Result<()> { 20 | let mut server = TestServer::new().await?; 21 | let status = server.api.user_logout().await.unwrap_err().status; 22 | assert_eq!(status, 401); 23 | 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /agdb_api/php/docs/Model/InsertEdgesQuery.md: -------------------------------------------------------------------------------- 1 | # # InsertEdgesQuery 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **each** | **bool** | If `true` create an edge between each origin and destination. | 8 | **from** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Origins | 9 | **ids** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Optional ids of edges (optionally a search sub-query). This can be empty. | 10 | **to** | [**\Agnesoft\AgdbApi\Model\QueryIds**](QueryIds.md) | Destinations | 11 | **values** | [**\Agnesoft\AgdbApi\Model\QueryValues**](QueryValues.md) | Key value pairs to be associated with the new edges. | 12 | 13 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 14 | -------------------------------------------------------------------------------- /agdb_web/app/assets/css/main.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | @import "@nuxt/ui"; 3 | 4 | @source "../../../content/**/*"; 5 | 6 | @theme static { 7 | --container-8xl: 90rem; 8 | --font-sans: "Public Sans", sans-serif; 9 | 10 | --color-green-50: #effdf5; 11 | --color-green-100: #d9fbe8; 12 | --color-green-200: #b3f5d1; 13 | --color-green-300: #75edae; 14 | --color-green-400: #00dc82; 15 | --color-green-500: #00c16a; 16 | --color-green-600: #00a155; 17 | --color-green-700: #007f45; 18 | --color-green-800: #016538; 19 | --color-green-900: #0a5331; 20 | --color-green-950: #052e16; 21 | } 22 | 23 | :root { 24 | --base-font: 25 | ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, 26 | Segoe UI Symbol, Noto Color Emoji; 27 | --ui-container: var(--container-8xl); 28 | 29 | font-family: var(--base-font); 30 | } 31 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [michaelvlach] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_exec.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use agdb_api::Queries; 8 | use serde::Deserialize; 9 | use serde::Serialize; 10 | 11 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 12 | pub(crate) struct DbExec { 13 | pub(crate) user: String, 14 | pub(crate) owner: String, 15 | pub(crate) db: String, 16 | pub(crate) queries: Queries, 17 | } 18 | 19 | impl Action for DbExec { 20 | async fn exec(self, _db: ServerDb, db_pool: DbPool) -> ServerResult { 21 | Ok(ClusterActionResult::QueryResults( 22 | db_pool 23 | .exec_mut(&self.owner, &self.db, &self.user, self.queries) 24 | .await?, 25 | )) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /agdb_server/src/action/change_password.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct ChangePassword { 12 | pub(crate) user: String, 13 | pub(crate) new_password: Vec, 14 | pub(crate) new_salt: Vec, 15 | } 16 | 17 | impl Action for ChangePassword { 18 | async fn exec(self, db: ServerDb, _db_pool: DbPool) -> ServerResult { 19 | let mut user = db.user(&self.user).await?; 20 | user.password = self.new_password; 21 | user.salt = self.new_salt; 22 | db.save_user(user).await?; 23 | 24 | Ok(ClusterActionResult::None) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /agdb/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agdb" 3 | version = "0.12.5" 4 | edition = "2024" 5 | license = "Apache-2.0" 6 | homepage = "https://github.com/agnesoft/agdb" 7 | repository = "https://github.com/agnesoft/agdb" 8 | documentation = "https://github.com/agnesoft/agdb" 9 | readme = "../README.md" 10 | description = "Agnesoft Graph Database" 11 | keywords = ["graph", "database"] 12 | categories = ["database", "database-implementations"] 13 | 14 | [lib] 15 | 16 | [features] 17 | default = ["derive"] 18 | api = ["derive"] 19 | derive = ["dep:agdb_derive"] 20 | openapi = ["dep:utoipa"] 21 | serde = ["dep:serde"] 22 | 23 | [dependencies] 24 | agdb_derive = { version = "0.12.5", path = "../agdb_derive", optional = true } 25 | utoipa = { version = "5", optional = true } 26 | serde = { version = "1", features = ["derive"], optional = true } 27 | 28 | [dev-dependencies] 29 | serde_json = { version = "1" } 30 | -------------------------------------------------------------------------------- /agdb_ci/src/utilities.rs: -------------------------------------------------------------------------------- 1 | use crate::CIError; 2 | use std::io::Write; 3 | use std::path::Path; 4 | use std::process::Command; 5 | 6 | #[cfg(target_os = "windows")] 7 | pub(crate) const BASH: &str = "C:/Program Files/Git/bin/bash.exe"; 8 | #[cfg(not(target_os = "windows"))] 9 | pub(crate) const BASH: &str = "bash"; 10 | 11 | pub(crate) fn run_command(command: &mut Command) -> Result { 12 | let out = command.output()?; 13 | std::io::stdout().write_all(&out.stdout)?; 14 | std::io::stderr().write_all(&out.stderr)?; 15 | if out.status.success() { 16 | Ok(String::from_utf8(out.stdout)?) 17 | } else { 18 | Err(format!( 19 | "Command failed: {command:?} ({})", 20 | command 21 | .get_current_dir() 22 | .unwrap_or(Path::new(".")) 23 | .to_string_lossy() 24 | ) 25 | .into()) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/src/mock/queryApiMock.ts: -------------------------------------------------------------------------------- 1 | export const queryApiMock = { 2 | "": { 3 | followers: ["select", "insert", "update", "delete"], 4 | }, 5 | select: { 6 | followers: ["key_count", "search", "from", "limit", "values"], 7 | }, 8 | values: { 9 | followers: ["key_count", "search", "from", "limit", "values"], 10 | values: ["string", "number", "boolean"], 11 | }, 12 | key_count: { 13 | followers: ["search", "from", "limit", "values"], 14 | }, 15 | search: { 16 | followers: ["from", "limit", "values"], 17 | }, 18 | from: { 19 | followers: ["limit", "values"], 20 | values: ["number"], 21 | }, 22 | limit: { 23 | followers: [], 24 | values: ["number"], 25 | }, 26 | insert: { 27 | followers: ["values"], 28 | }, 29 | update: { 30 | followers: ["search", "values"], 31 | }, 32 | delete: { 33 | followers: ["search"], 34 | }, 35 | }; 36 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/QueryView.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | 24 | 34 | -------------------------------------------------------------------------------- /agdb_web/app/pages/index.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 32 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_user_remove.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct DbUserRemove { 12 | pub(crate) owner: String, 13 | pub(crate) db: String, 14 | pub(crate) user: String, 15 | } 16 | 17 | impl Action for DbUserRemove { 18 | async fn exec(self, db: ServerDb, _db_pool: DbPool) -> ServerResult { 19 | let owner_id = db.user_id(&self.owner).await?; 20 | let db_id = db.user_db_id(owner_id, &self.owner, &self.db).await?; 21 | let user_id = db.user_id(&self.user).await?; 22 | db.remove_db_user(db_id, user_id).await?; 23 | 24 | Ok(ClusterActionResult::None) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /agdb_server/containerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine AS builder_studio 2 | WORKDIR /usr/src/agdb_studio 3 | COPY . . 4 | RUN npm i -g pnpm && pnpm i --frozen-lockfile && pnpm run build --filter agdb_studio 5 | 6 | FROM rust:alpine AS builder_server 7 | WORKDIR /usr/src/agdb_server 8 | COPY . . 9 | COPY --from=builder_studio /usr/src/agdb_studio/agdb_studio/app/dist /usr/src/agdb_server/agdb_studio/app/dist 10 | RUN apk add --no-cache musl-dev 11 | RUN AGDB_DOCKER_BUILD=true cargo build -r -p agdb_server --all-features 12 | 13 | FROM alpine:latest 14 | COPY --from=builder_server /usr/src/agdb_server/target/release/agdb_server /usr/local/bin/agdb_server 15 | # adduser -D: disable password, -H: do not create home directory 16 | RUN addgroup -g 1000 agdb && \ 17 | adduser -D -H -u 1000 -G agdb agdb && \ 18 | mkdir -p /agdb && \ 19 | chown agdb:agdb /agdb 20 | USER agdb 21 | WORKDIR /agdb 22 | CMD ["/usr/local/bin/agdb_server"] 23 | 24 | EXPOSE 3000 25 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_backup.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct DbBackup { 12 | pub(crate) owner: String, 13 | pub(crate) db: String, 14 | } 15 | 16 | impl Action for DbBackup { 17 | async fn exec(self, db: ServerDb, db_pool: DbPool) -> ServerResult { 18 | let user = db.user_id(&self.owner).await?; 19 | let mut database = db.user_db(user, &self.owner, &self.db).await?; 20 | database.backup = db_pool 21 | .backup_db(&self.owner, &self.db, database.db_type) 22 | .await?; 23 | db.save_db(&database).await?; 24 | Ok(ClusterActionResult::None) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /agdb_api/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agdb_api" 3 | version = "0.12.5" 4 | edition = "2024" 5 | license = "Apache-2.0" 6 | homepage = "https://github.com/agnesoft/agdb" 7 | repository = "https://github.com/agnesoft/agdb" 8 | documentation = "https://github.com/agnesoft/agdb" 9 | readme = "../../README.md" 10 | description = "Agnesoft Graph Database API (Client)" 11 | keywords = ["graph", "database", "api"] 12 | categories = ["database", "api-bindings"] 13 | 14 | [lib] 15 | 16 | [features] 17 | default = [] 18 | rust-tls = ["reqwest/rustls-tls"] 19 | native-tls = ["reqwest/native-tls"] 20 | api = ["agdb/api"] 21 | 22 | [dependencies] 23 | agdb = { version = "0.12.5", path = "../../agdb", features = ["serde", "openapi"] } 24 | reqwest = { version = "0.12", default-features = false, features = ["charset", "http2", "macos-system-configuration", "json"] } 25 | serde = { version = "1", features = ["derive"] } 26 | serde_json = "1" 27 | utoipa = "5" 28 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@agdb-studio/utils", 3 | "version": "1.0.0", 4 | "description": "Utility library for AGDB Studio", 5 | "type": "module", 6 | "scripts": { 7 | "test": "vitest run --coverage", 8 | "build-only": "vite build", 9 | "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", 10 | "lint": "eslint --max-warnings=0 . --fix", 11 | "lint:check": "eslint --max-warnings=0 .", 12 | "format": "prettier --write src/", 13 | "format:check": "prettier --check src/", 14 | "before-commit": "pnpm run format && pnpm run lint && pnpm run test" 15 | }, 16 | "dependencies": {}, 17 | "devDependencies": { 18 | "@agdb-studio/tsconfig": "workspace:*", 19 | "@agdb-studio/testing": "workspace:*", 20 | "vite": "catalog:", 21 | "vitest": "catalog:", 22 | "vue-tsc": "catalog:", 23 | "eslint": "catalog:", 24 | "prettier": "catalog:" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.github/workflows/agdb_api_php.yaml: -------------------------------------------------------------------------------- 1 | name: agdb_api_php 2 | 3 | on: 4 | pull_request: 5 | branches: ["main"] 6 | paths: 7 | - composer.json 8 | - agdb_api/php/** 9 | - .github/workflows/agdb_api_php.yaml 10 | 11 | jobs: 12 | agdb_api_php: 13 | runs-on: ubuntu-latest 14 | defaults: 15 | run: 16 | working-directory: agdb_api/php 17 | steps: 18 | - uses: actions/checkout@v4 19 | - run: npm i -g pnpm 20 | - run: pnpm i --frozen-lockfile 21 | - run: ./ci.sh format:check 22 | - run: composer config --global use-parent-dir true 23 | - run: composer install 24 | - run: ./ci.sh analyse 25 | - uses: actions-rust-lang/setup-rust-toolchain@v1 26 | - run: ./ci.sh coverage 27 | - uses: actions/upload-artifact@v4 28 | if: always() 29 | with: 30 | name: coverage 31 | path: agdb_api/php/coverage/ 32 | retention-days: 30 33 | -------------------------------------------------------------------------------- /agdb_studio/app/src/views/LoginView.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 14 | 15 | 37 | -------------------------------------------------------------------------------- /agdb_web/content/docs/02.examples/01.index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Overview" 3 | description: "agdb examples: embedded app, indexes, joins, schema migration, and server clients" 4 | --- 5 | 6 | The following links lead you to the example code in the `agdb` repository. For the guided examples see [guides](/docs/guides). 7 | 8 | - [app_db](https://github.com/agnesoft/agdb/tree/main/examples/app_db) 9 | 10 | - [indexes](https://github.com/agnesoft/agdb/tree/main/examples/indexes) 11 | 12 | - [joins](https://github.com/agnesoft/agdb/tree/main/examples/joins) 13 | 14 | - [schema migration](https://github.com/agnesoft/agdb/tree/main/examples/schema_migration) 15 | 16 | - [server client - rust](https://github.com/agnesoft/agdb/tree/main/examples/server_client_rust) 17 | 18 | - [server client - typescript](https://github.com/agnesoft/agdb/tree/main/examples/server_client_typescript) 19 | 20 | - [strong types](https://github.com/agnesoft/agdb/tree/main/examples/user_types) 21 | -------------------------------------------------------------------------------- /agdb/src/transaction.rs: -------------------------------------------------------------------------------- 1 | use crate::DbError; 2 | use crate::DbImpl; 3 | use crate::QueryResult; 4 | use crate::StorageData; 5 | use crate::query::Query; 6 | 7 | /// The `Transaction` is a proxy struct that 8 | /// encapsulates an immutably borrowed [`DbImpl`]. 9 | /// It allows running queries via [`exec()`](#method.exec). 10 | pub struct Transaction<'a, Store: StorageData> { 11 | db: &'a DbImpl, 12 | } 13 | 14 | impl<'a, Store: StorageData> Transaction<'a, Store> { 15 | /// Executes immutable queries: 16 | /// 17 | /// - Select elements 18 | /// - Select values 19 | /// - Select keys 20 | /// - Select key count 21 | /// - Select aliases 22 | /// - Select all aliases 23 | /// - Search 24 | pub fn exec(&self, query: T) -> Result { 25 | query.process(self.db) 26 | } 27 | 28 | pub(crate) fn new(data: &'a DbImpl) -> Self { 29 | Self { db: data } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /agdb_server/src/action/user_add.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_db::ServerUser; 6 | use crate::server_error::ServerResult; 7 | use agdb::DbSerialize; 8 | use serde::Deserialize; 9 | use serde::Serialize; 10 | 11 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 12 | pub(crate) struct UserAdd { 13 | pub(crate) user: String, 14 | pub(crate) password: Vec, 15 | pub(crate) salt: Vec, 16 | } 17 | 18 | impl Action for UserAdd { 19 | async fn exec(self, db: ServerDb, _db_pool: DbPool) -> ServerResult { 20 | db.insert_user(ServerUser { 21 | db_id: None, 22 | username: self.user, 23 | password: self.password, 24 | salt: self.salt, 25 | token: String::new(), 26 | }) 27 | .await?; 28 | Ok(ClusterActionResult::None) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /agdb_studio/libs/config/testing/vitest.shared.js: -------------------------------------------------------------------------------- 1 | import { 2 | defineConfig, 3 | configDefaults, 4 | coverageConfigDefaults, 5 | } from "vitest/config"; 6 | 7 | export default defineConfig({ 8 | test: { 9 | environment: "jsdom", 10 | exclude: [...configDefaults.exclude, "e2e/*"], 11 | coverage: { 12 | provider: "v8", 13 | all: true, 14 | exclude: [ 15 | ...coverageConfigDefaults.exclude, 16 | "e2e/*", 17 | "e2e-utils/*", 18 | "playwright-report/*", 19 | "*.config.*", 20 | "./src/main.ts", 21 | "./src/App.vue", 22 | "src/tests/*", 23 | "**/types.ts", 24 | "**/*.d.ts", 25 | "**/*.svg", 26 | ], 27 | thresholds: { 28 | lines: 100, 29 | functions: 100, 30 | branches: 100, 31 | statements: 100, 32 | }, 33 | reporter: ["text", "html", "json"], 34 | }, 35 | 36 | globals: true, 37 | }, 38 | }); 39 | -------------------------------------------------------------------------------- /agdb_api/typescript/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { mergeConfig, defineConfig } from "vitest/config"; 2 | import viteConfig from "./vite.config"; 3 | 4 | export default mergeConfig( 5 | viteConfig, 6 | defineConfig({ 7 | test: { 8 | coverage: { 9 | all: true, 10 | exclude: [ 11 | "dist/**", 12 | "eslint.config.mjs", 13 | "src/openapi.d.ts", 14 | "query_test_generator.js", 15 | "tests/**", 16 | "vite.config.ts", 17 | "vitest.config.ts", 18 | ], 19 | thresholds: { 20 | lines: 100, 21 | functions: 100, 22 | branches: 95, 23 | statements: 100, 24 | }, 25 | reporter: ["text", "html", "json"], 26 | }, 27 | }, 28 | }), 29 | ); 30 | -------------------------------------------------------------------------------- /agdb_derive/src/api_def/expression/array.rs: -------------------------------------------------------------------------------- 1 | use crate::api_def::expression; 2 | use crate::api_def::statement::ExpressionContext; 3 | use proc_macro2::TokenStream; 4 | use quote::quote; 5 | use syn::ExprArray; 6 | use syn::ExprIndex; 7 | 8 | pub(crate) fn parse_array(ar: &ExprArray, context: ExpressionContext) -> TokenStream { 9 | let elements = ar 10 | .elems 11 | .iter() 12 | .map(|elem| expression::parse_expression(elem, context.inner())); 13 | quote! { 14 | ::agdb::api_def::Expression::Array(&[#(#elements),*]) 15 | } 16 | } 17 | 18 | pub(crate) fn parse_index(e: &ExprIndex, context: ExpressionContext) -> TokenStream { 19 | let expr = expression::parse_expression(&e.expr, context.inner()); 20 | let index = expression::parse_expression(&e.index, context.inner()); 21 | quote! { 22 | ::agdb::api_def::Expression::Index { 23 | base: &#expr, 24 | index: &#index, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/src/account.ts: -------------------------------------------------------------------------------- 1 | import { client } from "@agdb-studio/api/src/api"; 2 | import { useAuth } from "./auth"; 3 | import { ref, watch } from "vue"; 4 | 5 | const username = ref(undefined); 6 | const admin = ref(false); 7 | 8 | const clearStatus = () => { 9 | username.value = undefined; 10 | admin.value = false; 11 | }; 12 | 13 | const { isLoggedIn, token } = useAuth(); 14 | const fetchUserStatus = async () => { 15 | if (!isLoggedIn.value) { 16 | clearStatus(); 17 | return; 18 | } 19 | 20 | return client.value?.user_status()?.then((status) => { 21 | username.value = status.data.username; 22 | admin.value = status.data.admin; 23 | }); 24 | }; 25 | watch(() => token.value, fetchUserStatus); 26 | 27 | export const useAccount = (): { 28 | username: typeof username; 29 | admin: typeof admin; 30 | fetchUserStatus: () => Promise; 31 | } => { 32 | return { username, admin, fetchUserStatus }; 33 | }; 34 | -------------------------------------------------------------------------------- /agdb_web/app/error.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 46 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/src/components/builder/QueryBuilderTabs.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from "vitest"; 2 | import { mount } from "@vue/test-utils"; 3 | import QueryBuilderTabs from "./QueryBuilderTabs.vue"; 4 | 5 | describe("QueryBuilderTabs", () => { 6 | it("renders the query builder tabs", () => { 7 | const wrapper = mount(QueryBuilderTabs); 8 | expect(wrapper.find(".query-builder-tabs").exists()).toBe(true); 9 | expect(wrapper.findAll(".button-tab").length).toBe(3); 10 | expect(wrapper.find(".button-tab.active").text()).toBe("exec"); 11 | }); 12 | it("switches tabs on click", async () => { 13 | const wrapper = mount(QueryBuilderTabs); 14 | const tabs = wrapper.findAll(".button-tab"); 15 | await tabs[1]?.trigger("click"); 16 | expect(wrapper.find(".button-tab.active").text()).toBe("exec_mut"); 17 | await tabs[2]?.trigger("click"); 18 | expect(wrapper.find(".button-tab.active").text()).toBe("context"); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/query/src/components/view/QueryView.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 24 | 25 | 35 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_clear.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use agdb_api::DbResource; 8 | use serde::Deserialize; 9 | use serde::Serialize; 10 | 11 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 12 | pub(crate) struct DbClear { 13 | pub(crate) owner: String, 14 | pub(crate) db: String, 15 | pub(crate) resource: DbResource, 16 | } 17 | 18 | impl Action for DbClear { 19 | async fn exec(self, db: ServerDb, db_pool: DbPool) -> ServerResult { 20 | let user = db.user_id(&self.owner).await?; 21 | let mut database = db.user_db(user, &self.owner, &self.db).await?; 22 | db_pool 23 | .clear_db(&self.owner, &self.db, &mut database, self.resource) 24 | .await?; 25 | db.save_db(&database).await?; 26 | Ok(ClusterActionResult::None) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_user_add.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use agdb_api::DbUserRole; 8 | use serde::Deserialize; 9 | use serde::Serialize; 10 | 11 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 12 | pub(crate) struct DbUserAdd { 13 | pub(crate) owner: String, 14 | pub(crate) db: String, 15 | pub(crate) user: String, 16 | pub(crate) db_role: DbUserRole, 17 | } 18 | 19 | impl Action for DbUserAdd { 20 | async fn exec(self, db: ServerDb, _db_pool: DbPool) -> ServerResult { 21 | let owner_id = db.user_id(&self.owner).await?; 22 | let db_id = db.user_db_id(owner_id, &self.owner, &self.db).await?; 23 | let user_id = db.user_id(&self.user).await?; 24 | db.insert_db_user(db_id, user_id, self.db_role).await?; 25 | 26 | Ok(ClusterActionResult::None) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "agdb", 3 | "packageManager": "pnpm@10.26.0", 4 | "scripts": { 5 | "dev": "turbo run dev", 6 | "build": "turbo run build", 7 | "type-check": "turbo run type-check", 8 | "test": "turbo run test", 9 | "test:e2e": "turbo run test:e2e", 10 | "lint": "turbo run lint", 11 | "lint:check": "turbo run lint:check", 12 | "format": "turbo run format", 13 | "format:check": "turbo run format:check", 14 | "before-commit": "turbo run before-commit", 15 | "build-studio": "turbo run agdb_studio#build" 16 | }, 17 | "devDependencies": { 18 | "@openapitools/openapi-generator-cli": "catalog:", 19 | "@playwright/test": "catalog:", 20 | "eslint": "catalog:", 21 | "openapicmd": "catalog:", 22 | "prettier": "catalog:", 23 | "turbo": "catalog:", 24 | "typescript": "catalog:", 25 | "vite": "catalog:", 26 | "vitest": "catalog:" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.github/workflows/agdb_api_typescript.yaml: -------------------------------------------------------------------------------- 1 | name: agdb_api_typescript 2 | 3 | on: 4 | pull_request: 5 | branches: ["main"] 6 | paths: 7 | - agdb_api/typescript/** 8 | - .github/workflows/agdb_api_typescript.yaml 9 | - pnpm-lock.yaml 10 | - pnpm-workspace.yaml 11 | - package.json 12 | 13 | jobs: 14 | agdb_api_typescript: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v4 18 | - run: npm i -g pnpm 19 | - run: pnpm i --frozen-lockfile 20 | - run: pnpm run format:check --filter=@agnesoft/agdb_api 21 | - run: pnpm run lint:check --filter=@agnesoft/agdb_api 22 | - run: pnpm run build --filter=@agnesoft/agdb_api 23 | - uses: actions-rust-lang/setup-rust-toolchain@v1 24 | - run: pnpm run test --filter=@agnesoft/agdb_api 25 | - uses: actions/upload-artifact@v4 26 | if: always() 27 | with: 28 | name: coverage 29 | path: agdb_api/typescript/coverage/ 30 | retention-days: 30 31 | -------------------------------------------------------------------------------- /agdb_derive/src/api_def/expression/block.rs: -------------------------------------------------------------------------------- 1 | use crate::api_def::statement; 2 | use crate::api_def::statement::ExpressionContext; 3 | use proc_macro2::TokenStream; 4 | use quote::quote; 5 | use syn::Block; 6 | 7 | pub(crate) fn parse_block(block: &Block, context: ExpressionContext) -> TokenStream { 8 | let expressions = parse_block_impl(block, context); 9 | 10 | quote! { 11 | ::agdb::api_def::Expression::Block(&[#(#expressions),*]) 12 | } 13 | } 14 | 15 | pub(crate) fn parse_block_impl(block: &Block, context: ExpressionContext) -> Vec { 16 | let context = context.inner(); 17 | block 18 | .stmts 19 | .iter() 20 | .enumerate() 21 | .map(|(i, stmt)| { 22 | statement::parse_statement( 23 | stmt, 24 | if i + 1 == block.stmts.len() { 25 | context.last() 26 | } else { 27 | context 28 | }, 29 | ) 30 | }) 31 | .collect() 32 | } 33 | -------------------------------------------------------------------------------- /agdb_server/build.rs: -------------------------------------------------------------------------------- 1 | use std::io::Write; 2 | use std::process::Command; 3 | 4 | #[cfg(target_os = "windows")] 5 | const BASH: &str = "C:/Program Files/Git/bin/bash.exe"; 6 | #[cfg(not(target_os = "windows"))] 7 | const BASH: &str = "bash"; 8 | 9 | fn run_command(command: &str, dir: &str) { 10 | let out = Command::new(BASH) 11 | .arg("-c") 12 | .arg(command) 13 | .current_dir(dir) 14 | .output() 15 | .unwrap(); 16 | std::io::stdout().write_all(&out.stdout).unwrap(); 17 | std::io::stderr().write_all(&out.stderr).unwrap(); 18 | } 19 | 20 | #[allow(dead_code)] 21 | fn build_studio() { 22 | if std::env::var("AGDB_DOCKER_BUILD").is_err() { 23 | run_command( 24 | "pnpm i --frozen-lockfile && pnpm run build --filter=agdb_studio", 25 | "../", 26 | ); 27 | } 28 | } 29 | 30 | fn main() { 31 | if !std::fs::exists("../agdb_studio/app/dist").unwrap() { 32 | #[cfg(feature = "studio")] 33 | build_studio(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/auth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@agdb-studio/auth", 3 | "version": "1.0.0", 4 | "description": "Auth library for AGDB Studio", 5 | "type": "module", 6 | "scripts": { 7 | "test": "vitest run --coverage", 8 | "build-only": "vite build", 9 | "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", 10 | "lint": "eslint --max-warnings=0 . --fix", 11 | "lint:check": "eslint --max-warnings=0 .", 12 | "format": "prettier --write src/", 13 | "format:check": "prettier --check src/", 14 | "before-commit": "pnpm run format && pnpm run lint && pnpm run test" 15 | }, 16 | "dependencies": { 17 | "vue": "catalog:", 18 | "@agdb-studio/api": "workspace:*" 19 | }, 20 | "devDependencies": { 21 | "@agdb-studio/tsconfig": "workspace:*", 22 | "@agdb-studio/testing": "workspace:*", 23 | "vite": "catalog:", 24 | "vitest": "catalog:", 25 | "vue-tsc": "catalog:", 26 | "eslint": "catalog:", 27 | "prettier": "catalog:" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/design/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@agdb-studio/design", 3 | "version": "1.0.0", 4 | "description": "Design library for AGDB Studio", 5 | "type": "module", 6 | "scripts": { 7 | "build-only": "vite build && vue-tsc --declaration --emitDeclarationOnly --outDir dist", 8 | "test": "echo \"No tests yet\" && exit 0", 9 | "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", 10 | "lint": "eslint --max-warnings=0 . --fix", 11 | "lint:check": "eslint --max-warnings=0 .", 12 | "format": "prettier --write src/", 13 | "format:check": "prettier --check src/", 14 | "before-commit": "pnpm run format && pnpm run lint && pnpm run test" 15 | }, 16 | "dependencies": { 17 | "vue": "catalog:" 18 | }, 19 | "devDependencies": { 20 | "@agdb-studio/tsconfig": "workspace:*", 21 | "@agdb-studio/testing": "workspace:*", 22 | "vite": "catalog:", 23 | "vue-tsc": "catalog:", 24 | "eslint": "catalog:", 25 | "prettier": "catalog:" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /agdb_studio/libs/core/profile/src/components/ProfileDropdown.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 23 | 24 | 35 | -------------------------------------------------------------------------------- /agdb_studio/libs/features/common/src/composables/content/utils.ts: -------------------------------------------------------------------------------- 1 | import type { Content, Paragraph } from "./types"; 2 | 3 | export type ConvertParams = { 4 | emphasizedWords?: string[]; 5 | }; 6 | 7 | export const EMPHASIZED_CLASSNAME = "emphasized"; 8 | 9 | const emphasizeWords = (text: string, words: string[]): Paragraph[] => { 10 | const parts = text.split(new RegExp(`(${words.join("|")})`, "g")); 11 | 12 | return parts.map((part) => { 13 | if (words.includes(part)) { 14 | return { text: part, className: EMPHASIZED_CLASSNAME }; 15 | } 16 | return { text: part }; 17 | }); 18 | }; 19 | 20 | const convertArrayOfStringsToContent = ( 21 | array: string[], 22 | params: ConvertParams | undefined = undefined, 23 | ): Content[] => { 24 | return array.map((text) => { 25 | if (params?.emphasizedWords) { 26 | return { paragraph: emphasizeWords(text, params.emphasizedWords) }; 27 | } 28 | return { paragraph: [{ text }] }; 29 | }); 30 | }; 31 | 32 | export { convertArrayOfStringsToContent }; 33 | -------------------------------------------------------------------------------- /agdb_server/src/action/db_restore.rs: -------------------------------------------------------------------------------- 1 | use super::DbPool; 2 | use super::ServerDb; 3 | use crate::action::Action; 4 | use crate::action::ClusterActionResult; 5 | use crate::server_error::ServerResult; 6 | use agdb::DbSerialize; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | #[derive(Clone, Serialize, Deserialize, DbSerialize)] 11 | pub(crate) struct DbRestore { 12 | pub(crate) owner: String, 13 | pub(crate) db: String, 14 | } 15 | 16 | impl Action for DbRestore { 17 | async fn exec(self, db: ServerDb, db_pool: DbPool) -> ServerResult { 18 | let user = db.user_id(&self.owner).await?; 19 | let mut database = db.user_db(user, &self.owner, &self.db).await?; 20 | 21 | if let Some(backup) = db_pool 22 | .restore_db(&self.owner, &self.db, database.db_type) 23 | .await? 24 | { 25 | database.backup = backup; 26 | db.save_db(&database).await?; 27 | } 28 | 29 | Ok(ClusterActionResult::None) 30 | } 31 | } 32 | --------------------------------------------------------------------------------