並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 32 件 / 32件

新着順 人気順

sql insert statement with null valuesの検索結果1 - 32 件 / 32件

  • 関数名、メソッド名、変数名でよく使う英単語のまとめ

    プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • 「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる

      はじめに 「Just use Postgres」という言葉を初めて聞いたのは、いつだったか覚えていません。Twitter か Hacker News か、あるいは社内の Slack か。どこで聞いたにせよ、私の反応は決まっていました。「また極端なことを言う人がいる」と。 「それ、〇〇でもできますよ」——この手のフレーズはもう100回は聞いてきました。そして大抵の場合、その〇〇は専用ツールに置き換えられていきます。技術が専門分化していくのは自然な流れです。 全文検索なら Elasticsearch。時系列データなら InfluxDB。メッセージキューなら RabbitMQ。それぞれの分野に専門家がいて、専用のソリューションがあって、ベストプラクティスがあります。「とりあえず Postgres で」なんて、それは思考停止ではないか、と。でも、心のどこかで気になっていたんです。 www.mann

        「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる
      • MySQLとOracleの実行計画を比較してみた - ASMのきもち

        まいえすきゅーえりたい ぽすぐれない おらくるってる(狂ってる)tomoです。 今日はいつものMySQLリファレンスを読むではなく、夏休みの宿題にしていたこれをやってみます。 MySQLとOracleDBの実行計画を比較してみた さて同じようなテーブルで同じデータを載せて。 実行計画を取ってみた時、どのくらい情報量が違うのか簡単に違いを見てみましょう。 前提として、以下をご認識ください。 一方はOSSのDBエンジン、もう一方はガチガチ商用DBエンジンです。情報量が違うのは当たり前であって、良し悪しを比較したいのではありません。そして製品比較をしたいのではありません。いつも商用DBメインで使っているエンジニアが、OSSのDBにこうゆう情報も出してほしいな!というのをお願いしたいと思っていて、それを考える元ネタメモだと思ってください。 OSSでこれだけの情報出せるMySQLや、今回紹介しません

          MySQLとOracleの実行計画を比較してみた - ASMのきもち
        • Go の ORM はどのようにして AUTO INCREMENT で採番された値を取得しているのか? - MySQL 編 - カミナシ エンジニアブログ

          こんにちは。カミナシで「カミナシレポート」の開発を担当しているソフトウェアエンジニアの佐藤です。 カミナシレポートのバックエンドは Go で開発しており、データベースには Amazon Aurora MySQL を使用しています。また、データベースアクセスには ORM ライブラリの GORM を採用しています。 ほとんどのテーブルでは、プライマリキー(ID列)に AUTO INCREMENT を利用しています。これらのテーブルに GORM の Create メソッドなどを使って新しいレコードを挿入すると、AUTO INCREMENT で採番された値が自動的に対応する Struct のフィールドに反映されます。 AUTO INCREMENT による値の採番は MySQL 側で実行されているため、Go 側の Struct のフィールドに反映させるためには、Go アプリケーション側が何らかの方法

            Go の ORM はどのようにして AUTO INCREMENT で採番された値を取得しているのか? - MySQL 編 - カミナシ エンジニアブログ
          • goquを駆使してgoでSQL構築も構造体マッピングもRDBテストもやる - エムスリーテックブログ

            【Unit4 ブログリレー6日目】 こんにちは、エムスリーエンジニアリンググループの福林 (@fukubaya) です。 最近まで開発していたm3ラウンジでは、goからRDBを利用していました。 m3ラウンジでは、SQLの組みやすさやテストのしやすさの観点で検討した結果、goquを採用しましたので、 そこで得られた知見とその実装例を紹介します。 これから試してみる方(と将来m3ラウンジの開発に新たに入ることになったメンバー)の参考になるように、サンプルコードも説明も多くなってしまいかなり長いです。 お時間ある時にお読みいただければ。 名古屋城は、日本の城のひとつ。尾張国愛知郡名古屋(現在の愛知県名古屋市中区本丸・北区名城)にある。本文には特に関係ありません。 m3ラウンジ goqu 実例 modelの構造体 mapper mapperの実装 goquのSQLの結果から構造体へのマッピング

              goquを駆使してgoでSQL構築も構造体マッピングもRDBテストもやる - エムスリーテックブログ
            • mysqlsh (MySQL Shell): Dump and Restore in AWS Aurora - LayerX エンジニアブログ

              LayerX インボイス を開発しているDX事業部の @yyoshiki41(中川佳希)です。 DX事業部ではデータベースとして MySQL(Amazon Aurora)を利用しています。 今回のブログは、mysqlsh (MySQL Shell) を用いて、Dumpデータ取得とリストアを行う際に気をつける点です。 mysqldump, mysqlpump Dumpデータ取得を行う際に、広く知られているのが mysqldump かと思います。 MySQL 5.7.8 からは、 mysqlpump という別のクライアントツールも提供されるようになりました。 主に下記のような特徴があります。 並列での処理が行われる(Parallel) Dump Progress がみれる 圧縮方式は、LZ4 と ZLIB が使用可能(mysqlpump Ver 1.0.0 Distrib 5.7.35) TA

                mysqlsh (MySQL Shell): Dump and Restore in AWS Aurora - LayerX エンジニアブログ
              • Build your own SQLite, Part 1: Listing tables

                As developers, we use databases all the time. But how do they work? In this series, we'll try to answer that question by building our own SQLite-compatible database from scratch. Source code examples will be provided in Rust, but you are encouraged to follow along using your language of choice, as we won't be relying on many language-specific features or libraries. As an introduction, we'll implem

                  Build your own SQLite, Part 1: Listing tables
                • BigQueryにおけるポリシータグを用いた秘密情報管理とデータ連携の仕組み - ZOZO TECH BLOG

                  こんにちは、データ基盤の開発・運用をしている谷口(case-k)です。 本記事では、BigQueryで秘密情報を守るためのリソースである、ポリシータグをご紹介します。ポリシータグの概要から採用理由、仕様を考慮したデータ連携の仕組みや運用における注意点まで幅広くお伝えします。 ポリシータグとは ポリシータグを採用した理由 匿名化による機密性の高さ 機密性と利便性の両立 データ基盤を保守運用しやすい 秘密情報をテーブルに新規追加しやすい 秘密情報の権限管理がしやすい ポリシータグを活用したデータ連携の仕組み 利用者が参照するデータ連携後のテーブル 2つのデータ連携基盤 日次データ連携基盤 基幹DBからBigQuery(Private)へのロード BigQuery公開環境への書き込み リアルタイムデータ連携基盤 BigQueryロード前にマスクしたカラムを追加 BigQueryへのストリーミング

                    BigQueryにおけるポリシータグを用いた秘密情報管理とデータ連携の仕組み - ZOZO TECH BLOG
                  • Weird Lexical Syntax

                    I just learned 42 programming languages this month to build a new syntax highlighter for llamafile. I feel like I'm up to my eyeballs in programming languages right now. Now that it's halloween, I thought I'd share some of the spookiest most surprising syntax I've seen. The languages I decided to support are Ada, Assembly, BASIC, C, C#, C++, COBOL, CSS, D, FORTH, FORTRAN, Go, Haskell, HTML, Java,

                      Weird Lexical Syntax
                    • Rails 8.0 Changelog(全項目リンク付き)|TechRacho by BPS株式会社

                      【速報】Rails 8.0.0がリリースされました Rails 8.0(v8.0.0タグ)は、7.2.0リリースから半年後のリリースということもあり、メジャーリリースとしてはChangelogの変更件数が少なめなのが特徴です。機能面では、Strong Parametersのexpect追加や、MySQL 5.5のサポート廃止が目につきます。大きなbreaking changesも今のところ見当たりません。 rails/rails at v8.0.0 以下、Rails 8.0のChangelogを件数の多い順に見ていきます。なお、原則として削除のChangelogは、その項目が非推奨化されたときのプルリク情報にリンクしています。 なお、以下の機能にはChangelogがありません。 Action Mailbox Action Mailer 🔗 Active Record(56件) Rail

                        Rails 8.0 Changelog(全項目リンク付き)|TechRacho by BPS株式会社
                      • Unconventional PostgreSQL Optimizations

                        When it comes to database optimization, developers often reach for the same old tools: rewrite the query slightly differently, slap an index on a column, denormalize, analyze, vacuum, cluster, repeat. Conventional techniques are effective, but sometimes being creative can really pay off! In this article, I present unconventional optimization techniques in PostgreSQL. image by abstrakt design Table

                          Unconventional PostgreSQL Optimizations
                        • PostgreSQL 15にMERGE文UPSERTがやってくる | DevelopersIO

                          UPSERT とは データベースにレコードを反映する際、100%新規データを扱うのであれば、テーブルにINSERTするだけですみます。 更新データも存在する場合、新規の場合は INSERT 、更新の場合は UPDATE というように処理を振り分ける必要があります。 このように、データの状態によって UPDATE と INSERT を使い分けることを、UPDATE と INSERT をくっつけて UPSERT と呼びます。 PostgreSQL は9.5で INSERT を試し、制約違反が発生すれば UPDATE する INSERT ... ON CONFLICT 構文の UPSERT に対応しました。 PostgreSQL 以外にも、MySQLやSQLiteがこの方式のUPSERTに対応しています。 INSERT INTO target(tid, val) VALUES(123, 10)

                            PostgreSQL 15にMERGE文UPSERTがやってくる | DevelopersIO
                          • Gaudiy Tech Blog

                            この記事は#GauDev Advent Calendar 2025の15日目です。 はじめに こんにちは、Gaudiyでエンジニアをしている@mrskiroです。 私が所属するチームでは、新規事業の複数立ち上げに向けてより高速に開発を行える、AIネイティブな開発フローを模索していました。AI駆動開発というキーワードは盛り上がり始めていましたが、コード生成の話が中心で開発プロセス全体をどう回すかのベストプラクティスはまだ見当たりませんでした。 そんな中で出会ったのがAWSの提唱する「AI-DLC(AI-Driven Development Lifecycle)」です。この記事では、AI-DLCを実践したこの3ヶ月間の取り組みについて紹介します。 AI-DLCとは AI-DLC(AI-Driven Development Lifecycle)は、AWSが提唱した開発ライフサイクルの考え方です。

                              Gaudiy Tech Blog
                            • RDBMSの実装を学ぶためにRust製OSSのtoyDBにTHANKYOU文とPLEASE句を実装してみた | DevelopersIO

                              MAD事業部@大阪の岩田です。 2021年の話になってしまいますが、エイプリルフールネタとして各種RDBMSにPLEASE句を実装する試みが流行していた?ようです。 この記事を読み、自分でもPLEASE句の実装に挑戦してRDBMSの実装について学んでみようと思い立ちました。Rustを勉強したいなーと思っていたこともありRust製の手頃なOSSを探してみたたところ、toyDBというちょうど良さそうなOSSを見つけたので、こちらを利用して進めていきます。 このブログでは最終的には以下を目標としてtoyDBに機能追加していきたいと思います。 THANKYOU文の実装 クライアントがTHANKYOUとリクエストすると、Your Welcome!!を返却する PLEASE句の実装 SELECT文の先頭にPLEASEを付与できるようにする ※DELETEやUPDATE等は今回割愛 PLEASE句を付与

                                RDBMSの実装を学ぶためにRust製OSSのtoyDBにTHANKYOU文とPLEASE句を実装してみた | DevelopersIO
                              • 週刊Railsウォッチ: スライド『Rails 7.1をn倍速くした話』、Rails 7.1でMessagePackをサポートほか(20230502)|TechRacho by BPS株式会社

                                こんにちは、hachi8833です。RubyKaigi 2023のグルメ情報も出ましたね。 はてなブログに投稿しました #はてなブログ #rubykaigi ☕️Coffeehouse スポンサー & 松本グルメ情報🍴 - ESM アジャイル事業部 開発者ブログhttps://t.co/s0t8wkX6Yi — ESM, Inc. (@rubyagile) April 28, 2023 週刊Railsウォッチについて 各記事冒頭には🔗でパーマリンクを置いてあります: 社内やTwitterでの議論などにどうぞ 「つっつきボイス」はRailsウォッチ公開前ドラフトを(鍋のように)社内有志でつっついたときの会話の再構成です👄 お気づきの点がありましたら@hachi8833までメンションをいただければ確認・対応いたします🙏 TechRachoではRubyやRailsなどの最新情報記事を平日

                                  週刊Railsウォッチ: スライド『Rails 7.1をn倍速くした話』、Rails 7.1でMessagePackをサポートほか(20230502)|TechRacho by BPS株式会社
                                • Yes, I can connect to a DB in CSS

                                  As they’re wont to do, a certain tweet was floating around the interwebs for a while the other week. Recruiters be like: We’re looking for someone who can connect to the database using CSS. It’s been a hell of a long time since I last embarked on a quality shitpost project1, in fact it’s been so long that back then I probably didn’t even have the word shitpost in my vocabulary. To that end, I was

                                  • What's New in Emacs 28.1?

                                    Try Mastering Emacs for free! Are you struggling with the basics? Have you mastered movement and editing yet? When you have read Mastering Emacs you will understand Emacs. It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes. Notable features include the formal inclusion of native compilation, a technique that will greatly speed up y

                                    • Aurora PostgreSQLでテーブルパーティショニングを導入した話 【実践編】 - GO Tech Blog

                                      技術戦略部 SREグループの古越です。 前回の記事でパーティショニングを導入する段階で注意するポイントについて主に触れてきました。今回は導入するために具体的に行った事や追加で導入する拡張機能の解説などを踏まえて紹介していきます。 前提知識と導入するまでの背景については前回の検討編を見て頂ければと思います。 Aurora PostgreSQLでテーブルパーティショニングを導入した話 【検討編】 実践したこと 前回のブログでも軽く触れましたが、導入する前には以下を重点的に検証し、実践しました。 パーティション管理の自動化のため pg_partmanを導入する local開発環境でpg_partmanを利用可能にする Aurora PostgreSQLパラメーターのチューニング パーティションの一部をS3にエクスポートする このあたりを具体的に解説していければと思います。 1. pg_partm

                                        Aurora PostgreSQLでテーブルパーティショニングを導入した話 【実践編】 - GO Tech Blog
                                      • Go 1.22 Release Notes - The Go Programming Language

                                        Introduction to Go 1.22 The latest Go release, version 1.22, arrives six months after Go 1.21. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before. Changes to the language Go 1.22 makes two changes to “for” loops. Previous

                                          Go 1.22 Release Notes - The Go Programming Language
                                        • MySQLの壊れたInnoDBファイル(.ibd)からのデータサルベージ / Restore corrupted (broken) InnoDB data from .ibd file - 雑な hinananoha

                                          この記事の対象 この記事は、MySQL Serverが突然の死を迎えた上に、以下のような重症症状が出た方向けの記事です。 MySQLサーバが以下のようなエラーを吐いて起動に失敗する 2022-06-16T11:30:47.188361Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 11:30:48 UTC - mysqld got signal 11 ; Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware. Thread pointer: 0x0 Attempting backtrace. You can use the following information t

                                            MySQLの壊れたInnoDBファイル(.ibd)からのデータサルベージ / Restore corrupted (broken) InnoDB data from .ibd file - 雑な hinananoha
                                          • Supercharge SQLite with Ruby functions

                                            An interesting twist in my recent usage of SQLite was the fact that I noticed my research scripts and the database intertwine more. SQLite is unique in that it really lives in-process, unlike standalone database servers. There is a feature to that which does not get used very frequently, but can be indispensable in some situations. By the way, the talk about the system that made me me to explore S

                                            • Kotlin+Ktorで技術要素を試しながらクリーンアーキテクチャでAPIサーバ構築 – rinoguchi's techlog

                                              まずは各ディレクトリを作成して、先ほど作ったApplication.ktをinfrastructureディレクトリに移動します。 設定(application.conf)を読み込んで /gradlew run 実行 設定ファイルでサーバーを構成できるようにしたいと思います。 Ktorでは、こちらを参照すると、mainClassNameで特定のWebサーバエンジンのEngineMainクラスを指定する必要があるようです。embeddedServerを利用する場合は、lambdaとDSLで記述するようです。 今回は Nettyエンジンを使うようにしたいと思います。 ./gradlew runで起動するメインクラスをNettyエンジンのメインクラスに変更 これまでは、対象のメインクラスを右クリックして直接プログラムを起動していましたが、Nettyエンジンのメインクラスを起動する際にはその方法は使

                                              • Making static sites dynamic with Cloudflare D1

                                                There are many ways to store data in your applications. For example, in Cloudflare Workers applications, we have Workers KV for key-value storage and Durable Objects for real-time, coordinated storage without compromising on consistency. Outside the Cloudflare ecosystem, you can also plug in other tools like NoSQL and graph databases. But sometimes, you want SQL. Indexes allow us to retrieve data

                                                  Making static sites dynamic with Cloudflare D1
                                                • AWS App Runner × FastAPI で作る REST API パターン 3 選 - サーバーワークスエンジニアブログ

                                                  こんにちは。アプリケーションサービス部の河野です。 アプリケーションサービス部では、週に一回、技術発表会という形で、発表者が興味がある技術について自由にプレゼンテーションしています。 その中で「App Runner で REST API 開発するの良いぞ」っていう話をしたので、本ブログでも紹介したいと思います。 導入 コールドスタート問題 デプロイ容量問題 serverless.yaml 書くのツラい問題 ローカルのテストしづらい問題 App Runner とは? FastAPI とは? 環境 パターン①: データストアなし パターン①: 実践 ローカルで動作確認 ECR を作成 イメージをビルド&プッシュ App Runner デプロイ 上手くいかない場合は? パターン②: DynamoDB パターン②: 実践 ローカルで動作確認 fastapi コンテナ localstack コンテナ

                                                    AWS App Runner × FastAPI で作る REST API パターン 3 選 - サーバーワークスエンジニアブログ
                                                  • Ubuntu 24.04 LTS (Noble Numbat) Release Notes

                                                    Noble Numbat Release Notes Table of Contents Introduction New features in 24.04 LTS Known Issues Official flavours More information Introduction These release notes for Ubuntu 24.04 LTS (Noble Numbat) provide an overview of the release and document the known issues with Ubuntu and its flavours. For details of the changes applied since 24.04, please see the 24.04.2 change summary. Support lifespan

                                                    • MySQL 8.0.24 の文字コードまわり - tmtms のメモ

                                                      2021/4/20 にリリースされた MySQL 8.0.24 について私が気になったものについて。 まあ文字コードまわりだけなんだけど。 utf8 を utf8mb3 として出力する Client applications and test suite plugins now report utf8mb3 rather than utf8 when writing character set names. (Bug #32164079, Bug #32164125) Important Note: When a utf8mb3 collation was specified in a CREATE TABLE statement, SHOW CREATE TABLE, DEFAULT CHARSET, the values of system variables containing c

                                                        MySQL 8.0.24 の文字コードまわり - tmtms のメモ
                                                      • How to Get or Create in PostgreSQL

                                                        "Get or create" is a very common operation for syncing data in the database, but implementing it correctly may be trickier than you may expect. If you ever had to implement it in a real system with real-life load, you may have overlooked potential race conditions, concurrency issues and even bloat! In this article I explore ways to "get ot create" in PostgresSQL. Illustration by Abstrakt Design Ta

                                                          How to Get or Create in PostgreSQL
                                                        • What I Wish Someone Told Me About Postgres

                                                          I’ve been working professionally for the better part of a decade on web apps and, in that time, I’ve had to learn how to use a lot of different systems and tools. During that education, I found that the official documentation typically proved to be the most helpful. Except…Postgres. It’s not because the official docs aren’t stellar (they are!)–they’re just massive. For the current version (17 at t

                                                          • January 2022 (version 1.64)

                                                            Update 1.64.1: The update addresses these security issues. Update 1.64.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 2022 release of Visual Studio Code. There are many updates in this version that we hope you will like, some of the key highlights include: New Side Panel - Display more view

                                                              January 2022 (version 1.64)
                                                            • Sketch of a Post-ORM

                                                              I’ve been writing a lot of database access code as of late. It’s frustrating that in 2023, my choices are still to either write all of the boilerplate by hand, or hand all database access over to some inscrutable “agile” ORM that will become a crippling liability in the 2-3y timescale. This post is about how I want to use databases, from the perspective of an application server developer—not a DBA

                                                                Sketch of a Post-ORM
                                                              • How We Went All In on sqlc/pgx for Postgres + Go

                                                                After a few months of research and experimentation with running a heavily DB-dependent Go app, we’ve arrived at the conclusion that sqlc is the figurative Correct Answer when it comes to using Postgres (and probably other databases too) in Go code beyond trivial uses. Let me walk you through how we got there. First, let’s take a broad tour of popular options in Go’s ecosystem: database/sql: Go’s b

                                                                  How We Went All In on sqlc/pgx for Postgres + Go
                                                                • PgBouncer is useful, important, and fraught with peril

                                                                  Updated 2024-09-17 to reflect updated PgBouncer support for protocol-level prepared statements 🐘 To start, I want to say that I’m appreciative that PgBouncer exists and the work its open source maintainers put into it. I also love working with PostgreSQL, and I’m thankful for the incredible amount of work and improvements that go into it as well. I also think community and industry enthusiasm aro

                                                                    PgBouncer is useful, important, and fraught with peril
                                                                  1