MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    合适的数据储存方式?

    开发交流
    3
    5
    81
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Dephairto last edited by

      正在编写mirai-console插件

      PluginData适合用于较大容量文件储存吗,例如储存几百张图片?

      以及

      PluginData适合存储几百行数据库表格吗?

      1 Reply Last reply Reply Quote 0
      • RainChan
        RainChan 摸鱼 last edited by

        几百张图可以直接存文件

        几百行数据用data其实也可以,但是考虑数据的增长可能还是数据库合适一点

        D 1 Reply Last reply Reply Quote 0
        • D
          Dephairto @RainChan last edited by

          @RainChan

          感谢解释

          能提供一个储存文件的实践吗?官方文档貌似没有解释这一点。

          RainChan 1 Reply Last reply Reply Quote 0
          • Karlatemp
            Karlatemp last edited by

            如果是图片这种二进制你应该考虑直接写进本地文件

            1 Reply Last reply Reply Quote 0
            • RainChan
              RainChan 摸鱼 @Dephairto last edited by

              @Dephairto 并没有,你可以使用orm或者是手写sql语句。也可以看看社区里有没有什么现成的库

              1 Reply Last reply Reply Quote 0
              • Moved from 技术交流板块 by  Karlatemp Karlatemp 
              • 1 / 1
              • First post
                Last post
              Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact