@@ -184,10 +184,10 @@ def compile_delete(self, expression, arguments):
184184 config .update ({
185185 "extends" : ["context://session/config" ],
186186 "name" : self .name or "" ,
187- "input" : "&.--.--::id " ,
187+ "input" : "&.--.--::- " ,
188188 "loader" : "const_loader" ,
189189 "loader_arguments" : {"datas" : []},
190- "output" : "&.-.&1::id " ,
190+ "output" : "&.-.&1::- " ,
191191 "querys" : {},
192192 "databases" : [],
193193 "predicate" : None ,
@@ -213,8 +213,8 @@ def compile_query(self, expression, arguments):
213213 config .update ({
214214 "extends" : ["context://session/config" ],
215215 "name" : self .name or "" ,
216- "input" : "&.-.&1::id " ,
217- "output" : "&.-.&1::id " ,
216+ "input" : "&.-.&1::- " ,
217+ "output" : "&.-.&1::- " ,
218218 "querys" : {},
219219 "databases" : [],
220220 "predicate" : None ,
@@ -304,7 +304,7 @@ def compile_insert_into(self, expression, config, arguments):
304304 raise SyncanySqlCompileException ('unknown insert into, related sql "%s"' % self .to_sql (expression ))
305305
306306 if table_info ["db" ] == "-" and table_info ["name" ] == "_" :
307- config ["output" ] = "&.-.&1::id use I"
307+ config ["output" ] = "&.-.&1::- use I"
308308 else :
309309 update_type = "I"
310310 if table_info ["typing_options" ]:
@@ -313,8 +313,7 @@ def compile_insert_into(self, expression, config, arguments):
313313 continue
314314 update_type = typing_option
315315 break
316- config ["output" ] = "" .join (["&." , table_info ["db" ], "." , table_info ["name" ], "::" ,
317- "id" , " use " , update_type ])
316+ config ["output" ] = "" .join (["&." , table_info ["db" ], "." , table_info ["name" ], "::- use " , update_type ])
318317
319318 if isinstance (expression .args ["expression" ], (sqlglot_expressions .Select , sqlglot_expressions .Union )):
320319 select_expression = expression .args ["expression" ]
@@ -627,10 +626,10 @@ def compile_select(self, expression, config, arguments):
627626 primary_table ["outputer_primary_keys" ] = [column_alias ]
628627 break
629628 config ["input" ] = "" .join (["&." , primary_table ["db" ], "." , primary_table ["name" ], "::" ,
630- "+" .join (primary_table ["loader_primary_keys" ]) if primary_table ["loader_primary_keys" ] else "id " ,
629+ "+" .join (primary_table ["loader_primary_keys" ]) if primary_table ["loader_primary_keys" ] else "- " ,
631630 (" use " + arguments ["@use_input" ]) if arguments .get ("@use_input" ) else "" ])
632631 config ["output" ] = "" .join ([config ["output" ].split ("::" )[0 ], "::" ,
633- "+" .join (primary_table ["outputer_primary_keys" ]) if primary_table ["outputer_primary_keys" ] else "id " ,
632+ "+" .join (primary_table ["outputer_primary_keys" ]) if primary_table ["outputer_primary_keys" ] else "- " ,
634633 (" use " + config ["output" ].split (" use " )[- 1 ]) if " use " in config ["output" ] else (
635634 " use " + (arguments .get ("@use_output" ) or "I" ))])
636635
@@ -653,10 +652,10 @@ def compile_pipleline_select(self, expression, config, arguments, primary_table)
653652 pipeline = pipeline [:1 ] + ["$.*|array" ] + pipeline [1 :]
654653 config ["pipelines" ].append (pipeline )
655654 config ["input" ] = "" .join (["&." , primary_table ["db" ], "." , primary_table ["name" ], "::" ,
656- "+" .join (primary_table ["loader_primary_keys" ]) if primary_table ["loader_primary_keys" ] else "id " ,
655+ "+" .join (primary_table ["loader_primary_keys" ]) if primary_table ["loader_primary_keys" ] else "- " ,
657656 (" use " + arguments ["@use_input" ]) if arguments .get ("@use_input" ) else "" ])
658657 config ["output" ] = "" .join ([config ["output" ].split ("::" )[0 ], "::" ,
659- "+" .join (primary_table ["outputer_primary_keys" ]) if primary_table ["outputer_primary_keys" ] else "id " ,
658+ "+" .join (primary_table ["outputer_primary_keys" ]) if primary_table ["outputer_primary_keys" ] else "- " ,
660659 (" use " + config ["output" ].split (" use " )[- 1 ]) if " use " in config ["output" ] else (
661660 " use " + (arguments .get ("@use_output" ) or "I" ))])
662661 arguments ["@primary_order" ] = False
@@ -822,7 +821,7 @@ def compile_join_column(self, expression, config, arguments, primary_table, colu
822821 else :
823822 primary_keys .append (primary_key )
824823 else :
825- primary_keys = ["id " ]
824+ primary_keys = ["- " ]
826825 join_db_table = "&&." + join_table ["db" ] + "." + join_table ["table" ] + "::" + "+" .join (primary_keys )
827826 if join_table ["querys" ]:
828827 join_db_table = [join_db_table , join_table ["querys" ]]
0 commit comments