Skip to content

有考虑支持Firebird数据库吗? #443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
asine opened this issue Aug 30, 2020 · 7 comments
Closed

有考虑支持Firebird数据库吗? #443

asine opened this issue Aug 30, 2020 · 7 comments

Comments

@asine
Copy link

asine commented Aug 30, 2020

Firebird 小巧 免费 功能也算强大

@2881099
Copy link
Collaborator

2881099 commented Aug 30, 2020

之前研究过,firebird分单机版和服务器版,需要做两套适配,所以没有做完。

@2881099
Copy link
Collaborator

2881099 commented Aug 30, 2020

就看大家都在使用哪个版本,如果两个版本都适配,那太麻烦了,最关键 firebird 使用者太少

@asine
Copy link
Author

asine commented Aug 30, 2020

从内心来说两个版本都适配最好,实在不行的话做服务器版就可以了。Firebird使用者好像是有点少,这么好的数据库没人用。

@jianliulin
Copy link

jianliulin commented Sep 5, 2020

如果二选一,选择支持单机版更好,服务器版很多数据库可替代,单机版更能体现firebird的特色,sqlite虽然也很不错,但不支持嵌套事务。

@2881099
Copy link
Collaborator

2881099 commented Sep 5, 2020

如果只是映射 CRUD,不做CodeFirst自动迁移,DbFirst获取表信息,两个都能做。

@2881099
Copy link
Collaborator

2881099 commented Sep 5, 2020

单机版,服务器版,系统表差异太大了。

@2881099
Copy link
Collaborator

2881099 commented Sep 12, 2020

目前实现了 CodeFist 模式开发,DbFirst 模式开发。

父子关系实体类,递归查询。

一对多,多对多,级联查询,级联保存。

实现不足的地方,大家看看有没有办法突破:

1. 自增类型 codefirst 开发模式下,建议初次建表的时候确定好,因为后续调整会导致迁移失败

2. _(已解决)_lambda 表达式解析 DateTime 对象 ToString(“yyyyMM”) 未处理,firebird 提供的函数实在太少,处理起来特别麻烦,其他数据库已实现的功能取:

var t4 = fsql.Select<T>()
  .First(a => a.CreateTime.ToString("HH:mm:ss");
// SELECT date_format(a.`CreateTime`, '%H:%i:%s') as1 
// FROM `xxx` a 
// limit 0,1

v1.5.0 支持了常用 c# 日期格式化,yyyy MM dd HH mm ss yy M d H hh h m s tt t

tt t 为 AM PM

3. _(已解决)_lambda 表达式解析 string.Join + ToList 没有找到相应的数据库函数,其他数据库已实现的功能如:

v1.8.0+ string.Join + ToList 实现将子查询的多行结果,拼接为一个字符串,如:"1,2,3,4"

fsql.Select<Topic>().ToList(a => new {
  id = a.Id,
  concat = string.Join(",", fsql.Select<StringJoin01>().ToList(b => b.Id))
});
//SELECT a.`Id`, (SELECT group_concat(b.`Id` separator ',') 
//    FROM `StringJoin01` b) 
//FROM `Topic` a

提示:子查询 string.Join + ToList 适配了 sqlserver/pgsql/oracle/mysql/sqlite/达梦/金仓 #405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants