问题标签 [database-driven]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
46 浏览

sqlite - 如果没有运行 DBMS,什么会执行应用程序提交的 SQL 命令?

当您编写使用数据库驱动程序的程序时,从 为什么编程接口到数据库称为驱动程序?

有些数据库允许您将它们嵌入到您的进程中(例如 sqlite),但是如果您正在使用具有自己的进程 [es] 的数据库(例如 postgresql),那么是的,它(它们)必须启动并且运行以针对该数据库工作。

因此,一些数据库“允许您将它们嵌入到您的流程中(例如 sqlite)”。如果没有运行 DMBS,你的进程向什么提交 SQL 命令,什么解析和执行 SQL 命令?(例如,在 SQLite 的情况下。)

您的应用程序在 SQLite 运行时和不运行时都工作吗?

0 投票
1 回答
343 浏览

java - 缺少来自数据库驱动的消息 bean 的默认 Spring 消息

我创建了一个数据库驱动的消息 bean,它从数据库加载消息,如果找不到消息键,那么它会回退到属性文件。它工作正常,除了一件事。spring 的所有其他消息属性都丢失了。(例如,来自 spring security AbstractSecurityInterceptor.authenticationNotFound 的错误消息。)

春天 4.1.6

0 投票
3 回答
5089 浏览

java - Enum with constant and also dynamic values from database

I have a current state where an enum MyType represent Type table with columns as:

And it's used to identify type using ID parameter with byId method:

My new requirement is to support also values exists in Type table, I found answers for dynamic enum, but accept answer is not to do it

No. Enums are always fixed at compile-time. The only way you could do this would be to dyamically generate the relevant bytecode.

What will be a better solution for finding also values (mainly IDs) from database (for example ID 30)

Can I extends existing state instead of change it? can I add extra IDS from database using method?

EDIT

Even if I update as @StefanFischer suggested an interface which populate map with enum class and new database class, I still expect in code an enum return by byId method,

0 投票
1 回答
108 浏览

angular - 角度上的动态形式

我们正计划使用 Angular 将我们当前的网站 (asp.net worbforms) 升级为单页应用程序。我还没有完全熟悉角度,但是动态形式在角度上可行吗?(数据库驱动页面)

在我们当前的网站上,用户可以通过创建新问题来创建自定义问卷表格 示例:问题 1:(单选按钮)Y/N “您有驾照吗?问题 2:(日期选择器)生日问题 3:(文本框)告诉我关于你自己问题 4:(下拉)国家等。

然后将这些创建的问题保存到数据库中,然后加载到页面上供用户回答,并将他们的答案保存在数据库中。因此,每种形式都因创建它的人而异。

这在角度上可行吗?

0 投票
0 回答
137 浏览

java - Spring - 根据数据库决定配置文件

我们使用 aWebApplicationInitializer根据本地属性来决定相关的 Spring profile

我们要根据数据库表(一个中心位置)决定弹簧配置文件

问题是不是所有的bean都被初始化了,可以直接完成吗?

从数据库加载弹簧配置文件是一种好方法还是反模式/错误?

  • 注意我们已经@Order(1)在我们的课程中使用

我发现了旧的相关问题,但没有任何解决方案

在 ApplicationContextInitializer 中,我不能使用 Spring bean,因为应用程序上下文尚未完全初始化。对数据库的低级别访问是我唯一的选择吗?

可以选择保留将加载数据库的集群服务器,然后所有服务器都将使用集群获取配置文件,但这似乎是一种开销