投稿時間:2023-07-21 13:15:20 RSSフィード2023-07-21 13:00 分まとめ(20件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] 「KADOKAWAドワンゴ情報工科学院」誕生 専門校「バンタンテックフォードアカデミー」が名称変更 https://www.itmedia.co.jp/news/articles/2307/21/news127.html 産学連携 2023-07-21 12:41:00
IT ITmedia 総合記事一覧 [ITmedia News] 第3世代の「Echo Show 5」発売 処理速度アップにMatter対応、淡いブルーの新色も https://www.itmedia.co.jp/news/articles/2307/21/news126.html amazoncojp 2023-07-21 12:37:00
IT ITmedia 総合記事一覧 [ITmedia News] 「ポケモンスリーブ」使った? Twitterでは“チュートリアル”突破報告相次ぐ 記者も使ってみた https://www.itmedia.co.jp/news/articles/2307/21/news123.html itmedia 2023-07-21 12:31:00
IT ITmedia 総合記事一覧 [ITmedia PC USER] ASUS、法人向けミニデスクトップ「ExpertCenter PN64」にWindows 11 Pro搭載のバリエーション構成モデルを追加 https://www.itmedia.co.jp/pcuser/articles/2307/21/news121.html asusjapan 2023-07-21 12:12:00
IT 情報システムリーダーのためのIT情報専門サイト IT Leaders シチズンマシナリー、部門横断で顧客情報を共有するCRMシステムをSalesforceで構築 | IT Leaders https://it.impress.co.jp/articles/-/25126 シチズンマシナリー、部門横断で顧客情報を共有するCRMシステムをSalesforceで構築ITLeaders工作機械メーカーのシチズンマシナリー本社長野県北佐久郡は、営業部門や製造部門などの部門を横断して顧客情報や業務情報を共有可能なCRM顧客関係管理システムを構築し、年初頭より稼働開始した。 2023-07-21 12:02:00
python Pythonタグが付けられた新着投稿 - Qiita Pythonで円形の積み上げ棒グラフ(Circular Stacked Bar)をプロットする https://qiita.com/moshi/items/1cbdb6365cb18ba070ba circularstackedbar 2023-07-21 12:13:09
js JavaScriptタグが付けられた新着投稿 - Qiita イベント/予定/タスクの終了日時は「非包括的(non-inclusive)」で設計した方が良い https://qiita.com/jun1s/items/b0dca1d666afde1de034 inclusive 2023-07-21 12:58:59
海外TECH DEV Community Speed up you app by returning multi-dimensional data in Postgres with Supabase https://dev.to/tholder/speed-up-you-app-by-returning-multi-dimensional-data-in-postgres-with-supabase-2520 Speed up you app by returning multi dimensional data in Postgres with SupabaseLet s reduce the amount of database queries you re running per page and make your code cleaner at the same time by returning multi dimensional data and type it correctly For the purpose of explaining this we are going to use the relationship that exists in our product between teams and the members of a team Each team can can have one or many members This relationship can be visually seen on a team card on the dashboard of the app where we show team members that belong to each team Approach Multiple Queries Typically when developing something like this we might run following queries on our page SELECT FROM teams And then for each team we would run SELECT FROM team members tm INNER JOIN users u ON tm user id u id WHERE tm id TEAM ID ok so whilst this SQL is really simple to understand it creates an n issue This basically means for every team you re having to run an additional query as the number of teams grows so does the number of queries Approach Single Join Query The other alternative is to run something like this SELECT FROM teams t INNER JOIN team members tm ON t id tm team id INNER JOIN users u ON tm user id u id WHERE tm id TEAM ID This is pretty straight forward SQL the problem is you end up with results like this Team NameFirst NameLast NameJob TitleBoardshape IncNickHolderCMOBoardshape IncRickSmouldersCTOBoardshape IncTomHolderCEOBoardshape IncMarianaFloresChairpersonBoardshape IncDavidAndersonNon ExecutiveBoardshape IncMoHaiderNon ExecutiveBoardshape IncSimonHughesSecretaryBoardshape IncSaraHatfieldContent ManagerYou have one row for each team member and all the team data is replicated This is annoying because you want to iterate teams and then iterate members within those teams Whilst you can do this in JS the code is going to be a bit messy and you re sending more data over the wire Another important reason why not to take this approach is that Supabase can not automatically type this query for you You will need to create a view and that view will be it s own type Approach Strongly typed multi dimensional results Here is a different approach you might want to consider Returning one row per team but with the team members embeded as json per row and here s how to do it Note For the sake of brevity these aren t our actual queries they only contain a subset of the fields and consequently their may be some minor discrepancies We are also doing more complex joins because of our user security context Start with creating a postgres function CREATE OR REPLACE FUNCTION public get team members team id uuid RETURNS jsonb LANGUAGE plpgsql STABLE SECURITY DEFINERAS function DECLARE result jsonb BEGIN SELECT json agg row to json t INTO result FROM SELECT tm team id tm user id u id as user id u first name u last name u job title FROM public team members AS tm INNER JOIN public profiles AS u ON u id tm user id WHERE tm team id get team members team id t RETURN result END function The result of this function gives you a JSON array that looks like this team id aadfb bfa a ae cca user id ebbf a da bf eedeccb last name Holder first name Nick job title CMO team id aadfb bfa a ae cca user id eefeb a dc dbc dffc last name Flores first name Mariana job title Chairperson Abbreviated Now we want to return the members as above alongside our teams data So we create a view like the following CREATE OR REPLACE VIEW public teams with team membersAS SELECT t name get team members t id AS membersFROM teams tYou then end up with results that look like this NameMembersBoardshape Inc JSON ARRAY AS ABOVE If it isn t obvious you would have one row per team You can now iterate teams and iterate members within those teams The magic of Supabase TypingWherever possible we want to leave our typing to Supabase We just run the following command supabase gen types typescript local schema public gt src database types tsIt spits out all the types for our tables and views We maintain our own database alias types ts where we shorten down the Supabase types we commonly use like this export type ViewTeamsWithTeamMembers Database public Views teams with team members Row An issue with this type though is that it looks like this teams with team members Row name string null members Json null The issue here is that members is of type JSON and isn t a strong type that will give us type checking We don t want to adjust this type because it s automatically maintained by Supabase What we can do to avoid this is create our own type in aliases based on the above which looks like this export interface TeamsWithTeamMemberProfiles extends Omit lt ViewTeamsWithTeamMembers members gt members TeamMembers null Here we re type members to be a strongly typed array of TeamMembers which is just another auto generated type from Supabase export type TeamMembers Database public Tables users Row There is actually an error in the above because our get team members database function doesn t actually return a record from users it s a joined hybrid record which Supabase doens t know about so there s actually another custom type you need to put in here but I ve kept this simple by way of an explanation The important thing is don t adjust your supabase types use them as a starting point for your own types This approach can also help with RLS rules because our function on the view is setup with SECURITY DEFINER For more on this read our post How to implement RLS for a team invite system with Supabase Working with Supabase and Postgres is so enjoyable we hope this gives you some ideas of ways to adjust your traditional approach of pulling back database records Please follow us on twitter for updates on when we post new engineering content and give BoardShape a try if you re interested in running better organized board meetings 2023-07-21 03:34:07
金融 JPX マーケットニュース [東証]新規上場日の初値決定前の気配運用について:(株)トライト https://www.jpx.co.jp/news/1031/20230721-01.html 新規上場 2023-07-21 13:00:00
金融 ニッセイ基礎研究所 アメリカの商業用不動産市場の動向~FRBは中小銀行のリスク集中を懸念~ https://www.nli-research.co.jp/topics_detail1/id=75489?site=nli CREのタイプ別の空室率はFRBの報告書には記載されていないが、通貨監督庁OCCが年月日に出した報告書ではコロナ後にオフィスの空室率が他のタイプと比較してより顕著に上昇していることが示されている。 2023-07-21 12:59:15
金融 金融資本市場分析 | 大和総研グループ 内外経済とマーケットの注目点(2023/7/21) https://www.dir.co.jp/report/research/capital-mkt/securities/20230721_023907.html 打ち止め 2023-07-21 12:15:00
金融 生命保険協会 障がい者支援施設に物品の寄贈をしました(熊本県協会) https://www.seiho.or.jp/info/social/2023/cr_20230721_1.html 障がい者 2023-07-21 13:00:00
海外ニュース Japan Times latest articles Popular Taiwan mayor stumbles in bid to lead in U.S.-China hotspot https://www.japantimes.co.jp/news/2023/07/21/asia-pacific/taiwan-mayor-stumbles-us-china-hotspot/ criticism 2023-07-21 12:02:17
ビジネス ダイヤモンド・オンライン - 新着記事 被災したら「医療費」はどうなる?自然災害多発の今こそ大事なお金の話 - 知らないと損する!医療費の裏ワザと落とし穴 https://diamond.jp/articles/-/326422 自然災害 2023-07-21 12:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 グーグルのAI開発、共同創業者ブリン氏が積極関与 - WSJ発 https://diamond.jp/articles/-/326538 関与 2023-07-21 12:13:00
ビジネス ダイヤモンド・オンライン - 新着記事 ロシアの穀物合意離脱、その狙いは - WSJ発 https://diamond.jp/articles/-/326539 離脱 2023-07-21 12:04:00
マーケティング MarkeZine 「ブランドパワーのスコアリング方法」を公開!木村元氏が解説する「実務家のためのブランディング」 http://markezine.jp/article/detail/42848 解説 2023-07-21 12:30:00
マーケティング MarkeZine 旭化成が解説!マーケティングで成果を出すに必要な営業との信頼関係、その構築法とは【参加無料】 http://markezine.jp/article/detail/42850 参加無料 2023-07-21 12:15:00
IT 週刊アスキー キャッシュや追加ストレージに使えるM.2 SSDも搭載できるASUSTOR製NAS「NIMBUSTOR 2 Gen2 AS5402T/AS5404T」 https://weekly.ascii.jp/elem/000/004/146/4146224/ asustor 2023-07-21 12:30:00
マーケティング AdverTimes 転職の際には「コレをやった」と納得してから次のステップへ 「広報の仕事とキャリア」リレー連載 真鍋順子(フェズ) https://www.advertimes.com/20230721/article427595/ 人事異動も多い日本企業の場合、専門職としてのキャリアを積もうとした場合、自分なりのキャリアプランも必要とされます。 2023-07-21 04:00:20

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)